Thursday, April 28, 2011

What's the best method for stripping undesirable html in rails?

I'm making a fairly basic rails app and I was wondering what's the best way to strip undesirable html from text field (basically, all I'm looking to preserve are links and no more than 2 linebreaks).

Currently, I'm stripping all html and using simpleformat, since it seems to be less overhead than using RDiscount and Markdown/Textile, but this is not really an ideal solution.

From stackoverflow

0 comments:

Post a Comment