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

fix: don't sanitize HTML in template generation #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vidriduch
Copy link
Collaborator

  • The go/html package automatically sanitizes the output to produce safe HTML. Which in some cases can break some of the levels. For example, it change '<' to '&lt;'.
  • Based on https://stackoverflow.com/questions/48527115/template-unnecessarily-escaping-to-lt-but-not there is not way to turn it off for html/template. But, we should be probably good with just using text/template without all the fancy HTML stuff
  • Replaced package html/template for just text/template

* The go/html package automatically sanitizes the output to produce safe HTML. Which in some cases can break some of the levels. For example, it change `'<'` to `'&lt;'`.
* Based on https://stackoverflow.com/questions/48527115/template-unnecessarily-escaping-to-lt-but-not there is not way to turn it off for html/template, but we should be probobly good with just using text/template without all the fancy HTML stuff
* Replaced package html/template for just text/template
@vidriduch vidriduch added the bug label Dec 5, 2024
@vidriduch vidriduch requested a review from mrshu December 5, 2024 22:39
@vidriduch vidriduch self-assigned this Dec 5, 2024
@vidriduch vidriduch changed the title fix: Don't sanitize HTML in template generation fix: don't sanitize HTML in template generation Dec 5, 2024
@vidriduch
Copy link
Collaborator Author

I would suggest some rounds of testing as there might be different behavior when generating lvls

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

Successfully merging this pull request may close these issues.

1 participant