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

Converter allows for headings up to h6, but sanitizer removes anything after h3. #30

Closed
GoogleCodeExporter opened this issue Dec 29, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. var converter = Markdown.getSanitizingConverter();
2. converter.makeHtml( '#h4-header')
3. the text 'h4-header' is returned.

What is the expected output? What do you see instead?
I expected '<h4>h4-header</h4>' to be returned

What version of the product are you using? On what operating system?
Latest version, OS X 10.7


Please provide any additional information below.

The issue is that on line 23 of Markdown-Sanitizer.js a whitelist is declared 
that only allows h tags up to h3.  However, line 747 of the 
Markdown-Converter.js allows h1-h6. Adding h4-h6 to the whitelist fixed the 
issues.

Original issue reported on code.google.com by dmar...@groupon.com on 5 Jul 2012 at 4:52

@GoogleCodeExporter
Copy link
Author

Original comment by b...@stackoverflow.com on 5 Jul 2012 at 4:53

  • Changed state: Duplicate

@GoogleCodeExporter
Copy link
Author

This is a duplicate of Issue 29, I apologize.

Original comment by dmar...@groupon.com on 5 Jul 2012 at 4:54

@GoogleCodeExporter
Copy link
Author

If anyone wants ATX header support for H1-H4 (can be easily adapted to H1-H6 
etc) using the header button see 
https://gist.github.com/dotnetchris/0f68c879082343295503

Original comment by ch...@marisic.com on 30 Sep 2014 at 5:57

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

No branches or pull requests

1 participant