Skip to content

Conversation

@cybrox
Copy link
Contributor

@cybrox cybrox commented May 24, 2019

This will fix #1010 when merged.

Using triple curly braces causes handlebars to render HTML and thus also escaped characters fine. This should not be an issue, because after converting the docs text with earmark and matching for h2 headings, the id's are run through HTML.strip_tags/1, ensuring that there are no actual html tags in them.

The escaping of characters (e.g. < to &lt;) is done by earmark, an alternative approach would be to re-unencode all escaped characters for the id's, but since HTML.strip_tags/1 is used anyways, there is no additional security benefit.

Using triple curly braces causes handlebars to render html and thus also escaped characters fine. This is not an issue, because after converting the docs text with earmark and matching for headings, they are run through HTML.strip_tags/1, ensuring that there are no actual html tags in them.
@josevalim josevalim merged commit 1a6bc9b into elixir-lang:master May 24, 2019
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@cybrox cybrox deleted the fix-sidebar-escape-chars branch May 24, 2019 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect page section escaping in sidebar

2 participants