Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible regression: Embeds Stripped Out Regardless of HTML Purifier Config #269

Closed
corneliusio opened this issue Jul 10, 2024 · 3 comments
Labels

Comments

@corneliusio
Copy link

Description

Noting that I have found this issues addressing this very problem and have referenced the docs regarding embedding media in CKEditor.

Currently have the following htmlpurifier config assigned to the field in question:

{
    "HTML.SafeIframe": true,
    "URI.SafeIframeRegexp": "%^https://%"
}

Steps to reproduce

  1. configure field with above htmlpurifier config
  2. embed video/media in editor
  3. save entry

Additional info

  • Craft version: Craft Pro 4.10.2
  • PHP version: 8.2
  • Database driver & version: MySQL 8.0
  • Plugins & versions:
Amazon S3             2.2.1
AsyncQueue            3.2.1
Audit                 3.0.3
Blitz Recommendations 2.2.1
Calendarize           2.0.0
CKEditor              3.8.3
CMS Guide             5.0.1
Colour Swatches       4.4.0
Cookies               4.0.1
Copy                  2.4.4
Easy Address Field    4.0.8
Element API           4.1.0
Elements Panel        2.0.0
Embedded Assets       4.1.0
Environment Label     4.0.3
Expanded Singles      2.0.5
Field Manager         3.0.8
Hyper                 1.1.32
Icon Picker           2.0.18
Jason                 3.0.1
Neo                   4.2.5
Otto                  0.1.1
Password Policy       4.1.0
Read-only Field       2.0.1
Reporter              2.3.0
Retcon                2.7.5
Retour                4.1.17
S3 Logger             dev-master
Scout                 dev-patch-1
SendGrid              2.0.1
Sentry SDK            3.0.0
SEO                   4.0.50
Sherlock              4.5.0
Smith                 2.0.1
Tags                  2.0.0
User Group Field      3.0.2
Webperf               4.0.2
Workflow              2.0.10
@i-just
Copy link
Contributor

i-just commented Jul 18, 2024

Hi, thanks for getting in touch! I’m unable to replicate this. I used your HTML Purifier config and embedded a YouTube video, and after saving the entry, the embedded video is still there. Can you please share a bit more info on how to replicate this? Do you have any mediaEmbed Config Options in the CKEditor Config used by this field? Does the issue persist when you disable all plugins other than CKEditor? Does the video still get stripped out if you disable the purifier?

@corneliusio
Copy link
Author

@i-just Thanks for the reply. To my chagrin it looks like our field config for the htmlpurify accidentally got reverted to default, so it was not using the configuration I posted above. This probably happened by accident while merging another developers work in git. Sorry for the mistaken issue!

@i-just
Copy link
Contributor

i-just commented Jul 19, 2024

Not a problem. Glad you got to the bottom of it, and that it works as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants