craftcms / ckeditor

Edit rich text content in Craft CMS using CKEditor.
https://plugins.craftcms.com/ckeditor
GNU General Public License v3.0
47 stars 25 forks source link

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

Closed corneliusio closed 4 months ago

corneliusio commented 4 months ago

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

i-just commented 4 months ago

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 commented 4 months ago

@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 commented 4 months ago

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