Possible bug in handling of HTML comments

Michel Fortin michel.fortin at michelf.com
Mon Jan 14 08:08:39 EST 2008


Le 2008-01-13 à 21:08, Fletcher T. Penney a écrit :


> It appears that the _EncodeAmpsAndAngles routine is being run over

> the comments, converting & and < to the HTML markup.

>

> I tried adding & and < to $g_escape_table, and then protecting

> them. This seemed to work, but caused other problems and is

> clearly not a viable solution.

>

> So it looks like there would have to be a specific mechanism in

> place for leaving comments alone, am I correct?



PHP Markdown deals with this correctly since I added span-level
hashes and use them to protect tags, comments, escapes, and
everything that must be left alone. Perhaps someone ought to backport
that system to Perl.


Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Markdown-Discuss mailing list