Purifier icon indicating copy to clipboard operation
Purifier copied to clipboard

Youtube, Vimeo and any iframe is removed Laravel 6

Open locphan57910 opened this issue 5 years ago • 4 comments

Specs: Laravel 6 PHP 7.4 editor: summernote

I am using the default settings. It removes any kind of iframe even with youtube.

locphan57910 avatar Jan 03 '20 03:01 locphan57910

Same on tinyMCE Laravel 6 PHP 7.3

djurovicigoor avatar Jan 13 '20 13:01 djurovicigoor

Did you (@locphan57910 and @djurovicigoor) both try to publish the configuration and tested with that configuration? It has a part especially about YouTube. Maybe tweak the regex a bit to make it work. ;)

Also: Maybe this tip works too, even though it's an old one. And check the docs for safe iframes also:

Whether or not to permit iframe tags in untrusted documents. This directive must be accompanied by a whitelist of permitted iframes, such as %URI.SafeIframeRegexp, otherwise it will fatally error. This directive has no effect on strict doctypes, as iframes are not valid.

CptChaos avatar Feb 08 '20 01:02 CptChaos

@locphan57910 and @djurovicigoor The first tip worked for me. I was just able to work on my project with Purifier and tried the first tip, which does work here.

GJPhilippi avatar Feb 22 '20 23:02 GJPhilippi

Just add 'youtube' at last as config, it worked for me in laravel 10: clean($request->body, 'youtube');

RakibSiddiquee avatar Aug 07 '23 12:08 RakibSiddiquee