Powered By IdeaScale
Login / Signup

mojomojo

The Catalyst-powered wiki

« Back To mojomojo
Escape '<', '>' and '&' in blocks
 
1
Check Completed
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].
Idea # 59Bugsformatting
Moderator Comments
Fixed by http://github.com/marcusramberg/mojomojo/commit/cf1aee5205dffd055fbd72ff079060ae91d2deb2
Comments
Status Changed from Active to Under Review.
Status Changed from Under Review to Complete.
 Have an account? - Login
Notify me via Email when someone responds or action is taken on this Topic/Idea
Activity Chart
Idea Rank : 41
Users Activity