Possible bug in handling of HTML comments

Fletcher T. Penney fletcher at fletcherpenney.net
Fri Jan 18 18:09:43 EST 2008


I was hoping for a more elegant solution (such as not encoding them in
the first place), but for now I guess this will do. I will add this
to the next version of MultiMarkdown as well.

Thanks Tomas.


Fletcher Penney


On Jan 14, 2008, at 1:05 PM, Tomas Doran wrote:


>

> On 14 Jan 2008, at 02:08, Fletcher T. Penney wrote:

>>

>> 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?

>>

>

> Yep, totally correct.

>

> I'm about to add this into Text::MultiMarkdown (will be in the 1.0.8

> release on CPAN in a week or two) - I've attached the diff that I've

> made to make this work (and test it).

>

> Please yell if you can think of a better / prettier / quicker way of

> doing it? ;)

>

> It's another case that shows up how building a parse tree would be a

> better approach (as we wouldn't need to do, then undo the encoding)

> - but what I have appears to work right now...

>

> Cheers

> Tom

>

> <

> ampsandanglesinhtmlcomments

> .diff>_______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss




--
Fletcher T. Penney
fletcher at fletcherpenney.net

Always remember you are nothing more than a collection of
complementary chemicals worth not more than $5.00
- Seen on the internet

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20080118/b37f8c31/attachment.bin>


More information about the Markdown-Discuss mailing list