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

Guides: do not escape markdown headers in custom renderer #3432

Merged

Conversation

filippoliverani
Copy link
Contributor

Description
Browsing the developers guide I found some html entities rendered inside headings tags.

Screenshot 2019-11-19 at 15 48 49

This PR updates CustomMarkdownRenderer to avoid to render html entities by considering source markdown headers safe.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have attached screenshots to this PR for visual changes (if needed)

Padrino::Helpers::TagHelpers#content_tag escapes by default the content
block. We can assume that markdown header is safe and avoid to escape
it so that html entities won't be rendered.
@filippoliverani filippoliverani changed the title Do not escape markdown haders in custom renderer Guides: do not escape markdown haders in custom renderer Nov 19, 2019
@filippoliverani filippoliverani changed the title Guides: do not escape markdown haders in custom renderer Guides: do not escape markdown headers in custom renderer Nov 19, 2019
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

@filippoliverani thank you 👍

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

@kennyadsl kennyadsl merged commit ce7f6e5 into solidusio:master Nov 20, 2019
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

Successfully merging this pull request may close these issues.

3 participants