Skip to content
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

strip_tags escapes ampersands, gt and lt #68

Open
youroff opened this issue Jun 24, 2024 · 3 comments
Open

strip_tags escapes ampersands, gt and lt #68

youroff opened this issue Jun 24, 2024 · 3 comments

Comments

@youroff
Copy link

youroff commented Jun 24, 2024

strip_tags replaces &, > and < symbols for corresponding HTML entities.
This is unexpected, since those are not tags and they're not being stripped.
Should it be a part of a different function instead?

@HarshBalyan
Copy link

@rrrene any thoughts?
I am using HtmlSanitizeEx.html5(some_binary) and it replaces the above-mentioned symbols with HTML entities. Anyway to prevent this from happening?

@rrrene
Copy link
Owner

rrrene commented Aug 14, 2024

Hi, sorry for the late reply.

I seem to remember that this is done by the library we use for parsing the HTML.

Not sure we can prevent this, but I will try to look into it 👍

edit: I confirmed that :mochiweb_html is doing this, which causes this behaviour.

@michaeljones
Copy link

Has anyone identified a version of this library where it doesn't happen? Is there one that is safe to roll back to or are there are concerns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants