Want to allow users to embed third-party content? (youtube or vimeo videos, podcast players)
You should use oEmbed.
This way you won't have to manually handle (sanitize, secure, ensure rendering) the embed code or parse content!
Users should provide an URL to content, not an HTML block!
My oembed app: https://oembed.superails.com/
Oembed app source code: https://github.com/yshmarov/oembed-parser-app
Text version: https://blog.corsego.com/oembed
0