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

camelCase attribute transform error #48

Closed
mydearxym opened this issue Feb 19, 2021 · 1 comment
Closed

camelCase attribute transform error #48

mydearxym opened this issue Feb 19, 2021 · 1 comment

Comments

@mydearxym
Copy link

mydearxym commented Feb 19, 2021

hi there ~

i am trying to do some custom sanitize logic for svg tag, but i found camelCase attribute will be transform to lowercase unexpectedly.

for example:

iex(12)> HtmlSanitizeEx.noscrub(~s(<svg viewBox="0 0 1024" width="20px"></svg>))
"<svg viewbox=\"0 0 1024\" width=\"20px\"></svg>"

viewBox -> viewbox

and also, svg tag has tons of those cameCase attruites, this make it very hard to sanitize ...

any plan to support Meta.allow_tag_with_these_attributes("svg", [*]) like syntax ?

@rrrene
Copy link
Owner

rrrene commented Jan 26, 2023

I apologize for the age/inactivity on this issue. I should have done a better job at resolving this properly. 😥

This particular issue is due to the used HTML parser and can not be solved by this library, unfortunately.

Please feel free to re-open this issue at your discretion.

@rrrene rrrene closed this as completed Jan 26, 2023
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

2 participants