This project is archived and is in readonly mode.
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
-
Repository June 8th, 2010 @ 04:02 PM
- State changed from new to resolved
(from [47bf19c8485ecead7280019c4815a2ed4f2161d5]) Made markdown honor :safe option and handle safe input. Also added tests for markdown.
[#4794 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/47bf19c8485ecead7280019c4815a2...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 4587 Give textilize() a better, but still html safe experience and ticket with patch for markdown => https://rails.light...
- 4794 Fix markdown to handle :safe, safe input and add tests [#4794 state:resolved]