B
Belorion
I've been trying to use RedCloth in a rails app. According to the
documentatoin at
http://redcloth.rubyforge.org/rdoc/classes/RedCloth.html#M000051, if I
supply [:filter_html] as an option when I create a new RedCloth
instance, all html not created by RedCloth is escaped. This doesn't
appear to be the case for me, though...
%> ruby -e "require 'rubygems'; require_gem 'RedCloth', '~> 3.0.3'; r=3D
RedCloth.new( \"<b>foo</b> *bar*\", [:filter_html] ); puts r.to_html "
Gives:
<p><b>foo</b> <strong>bar</strong></p>
Clearly, the html is not being espcaped, which is contrary to the
documenation, and not what I expected to happen. Has anyone been able
to get this to work? Or, alternatively, does anyone know of a library
that will provide similar functionality? Thanks.
Matt
documentatoin at
http://redcloth.rubyforge.org/rdoc/classes/RedCloth.html#M000051, if I
supply [:filter_html] as an option when I create a new RedCloth
instance, all html not created by RedCloth is escaped. This doesn't
appear to be the case for me, though...
%> ruby -e "require 'rubygems'; require_gem 'RedCloth', '~> 3.0.3'; r=3D
RedCloth.new( \"<b>foo</b> *bar*\", [:filter_html] ); puts r.to_html "
Gives:
<p><b>foo</b> <strong>bar</strong></p>
Clearly, the html is not being espcaped, which is contrary to the
documenation, and not what I expected to happen. Has anyone been able
to get this to work? Or, alternatively, does anyone know of a library
that will provide similar functionality? Thanks.
Matt