Purifier
Purifier copied to clipboard
Youtube, Vimeo and any iframe is removed Laravel 6
Specs: Laravel 6 PHP 7.4 editor: summernote
I am using the default settings. It removes any kind of iframe even with youtube.
Same on tinyMCE Laravel 6 PHP 7.3
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.
@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.
Just add 'youtube' at last as config, it worked for me in laravel 10:
clean($request->body, 'youtube');