-
Notifications
You must be signed in to change notification settings - Fork 52
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
no iframes in result #112
Comments
Hello! Astonishingly, I was just visiting this page today for the same reason. So I dug into the code. The current code starts by calling HtmlPurifier, and uses that to clean up the html of the input values, which is removing the values we want. :( However, we can override the HtmlPurifier settings to allow iframes around youtube to work. Part of this code is copied from an answer at https://stackoverflow.com/questions/4739284/htmlpurifier-iframe-vimeo-and-youtube-video
Once I changed my code to the above, the iframe (and youtube) came through fine. Edit: Changed how markdown is being applied to the code snippet for better readability. |
Hmm, it seems like HTMLPurifier is doing a lot more than just "fixing" invalid HTML (which is why it's used in this library), it shouldn't be trying to strip out anything in particular... it's meant to address invalid HTML to avoid parsing errors (and potentially make it more uniform). As @jcfiala mentioned, adjusting the config that way is a great solution. There is also the option to disable the HTML purifier altogether, just note that it's possible to encounter errors being thrown if invalid HTML is passed in |
Hi!
I have a html that contains iframes, for example a youtube-embed-code. HtmlDiff filters the iframes out when comparing (the iframes are missing in the result).
Is there a reason for that and can it be avoided?
Cheers
Kamil
The text was updated successfully, but these errors were encountered: