Skip to content

Conversation

arsssen
Copy link
Contributor

@arsssen arsssen commented Apr 13, 2018

No description provided.

@sourcelevel-bot
Copy link

Hello, @arsssen! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

end

defp sidebar_items_node(module_node) do
escape_quotes = &String.replace(&1, "\"", "\\\"")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to escape \ too in case it appears at the end of a module name (unlikely though not impossible)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escape, I think we should call #{inspect(id)} instead of #{id} when generating the sidebar data in the first place. :) That should take care of everything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to call html_escape or similar.

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.

3 participants