This project is archived and is in readonly mode.

#4794 ✓resolved
Rohit Arondekar

Fix markdown to handle :safe, safe input and add tests

Reported by Rohit Arondekar | June 8th, 2010 @ 12:35 PM

At present markdown doesn't handle the :safe option:

ruby-1.9.2-head > helper.markdown("test", :safe)
TypeError: can't convert Symbol into Integer

It also doesn't handle safe input properly (the <script> should not be escaped since the text is marked html_safe):

ruby-1.9.2-head > helper.markdown("This is worded <strong>strongly</strong><script>code!</script>".html_safe)
 => "<p>This is worded <strong>strongly</strong></p>"

I've fixed these two issues and also added tests. Patch attached.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by