Re:Show HN: Fast and Extensible Parser for Markdown in PHP
by McGlockenshire on Thursday May 22, 2014 @11:54AM
(#7784437)
Easily solved by proper use of HTMLPurifier on the output.
[ Parent
| on HN ]
Re:Show HN: Fast and Extensible Parser for Markdown in PHP
by phpnode on Thursday May 22, 2014 @01:01PM
(#7784854)
Thus negating any speed improvements in the markdown parser....
Re:Show HN: Fast and Extensible Parser for Markdown in PHP
by Navarr on Thursday May 22, 2014 @01:15PM
(#7784924)
Considering you have to run any markdown parser through a sanitizer, the speed improvements still matter.
Re:Show HN: Fast and Extensible Parser for Markdown in PHP
by phpnode on Thursday May 22, 2014 @01:24PM
(#7784979)
The markdown parser should be able to do it in an ideal world. Htmlpurifier is very slow.
edit:
To whoever downvoted me, I'm sorry, was I wrong? The markdown parser has to look at every input byte, obviously it's better to do the HTML sanitation at this level because the HTML parser must also look at every input byte, so, combine them into one pass...
Running HTMLPurifier on the output of the markdown parser is inefficient - it's sanitizing known good elements not just the potentially bad ones, so you're giving it more work to do.