Bugs

Escape '<', '>' and '&' in <code> blocks

I can't put HTML tags in this message which makes things hard. Please interpret all square brackets as angle brackets.

 

 

MojoMojo isn't escaping the text inside a [code] block from Markdown. If I have e.g. the following example on my page indented by four spaces:

 

$ curl http://mojomojo.org 2>/dev/null | grep "Mojo 0"

[meta http-equiv="powered by" content="MojoMojo 0.999029" /]

 

It will fail to render correctly because the angle brackets don't get escaped as they should. It doesn't appear to be Markdown or MultiMarkdown's fault though:

 

$ perl -e 'use Text::Markdown; $m = Text::Markdown->new(); print $m->markdown(" [foo]")'

[pre][code][foo]

[/code][/pre]

 

HTML::Defang also gets in the way, but if you disable it or use known tags, you still get the same problem. The only way to get the above example printed correctly appears to be to use Textile and wrap it in [pre].

Tags

Voting

1 vote
Idea No. 59