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

allow keeping text content of unknown tags #169

Closed
grosser opened this issue Feb 9, 2022 · 1 comment
Closed

allow keeping text content of unknown tags #169

grosser opened this issue Feb 9, 2022 · 1 comment

Comments

@grosser
Copy link

grosser commented Feb 9, 2022

ruby -r commonmarker -e 'puts CommonMarker.render_html("<script>alert(1)</script>")'

I want this to be alert(1) so we don't just throw away everything if we determine it unsafe

@grosser
Copy link
Author

grosser commented Feb 10, 2022

this works:

CommonMarker.render_html(str, [:UNSAFE])

... removes script tag but keeps the content :)

@grosser grosser closed this as completed Feb 10, 2022
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

1 participant