Hi all!
I am trying tu set up RedCloth for user-submitted comments. And here is
my problem. The :filter_html option just breaks images
For example, if I try in irb:
string= “Some textile !agif.gif! and textile again”
RedCloth.new(string, [:filter_html, :filter_styles]).to_html(:textile)
I get:
NoMethodError: You have a nil object when you didn’t expect it!
The error occured while evaluating nil.gsub
from ./script/…/config/…/config/…/lib/redcloth.rb:1118:in
`clean_html’
Huh? Everything works fine if I remove :filter_html (but then, my HTML
is potentially dangerous, and I prefer RedCloth’s html filter to Rails’
sanitize method, which is only a blacklist, that is to say vulnerable).
Any hint?
Thank you!
Nauhaie