Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#4794

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.

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

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: none