Has anyone encountered an equivalent to HTMLPurifier for Rails apps? Essentially I need to clean up often terribly formed HTML generated by users before saving to the DB.
Has anyone encountered an equivalent to HTMLPurifier for Rails apps? Essentially I need to
Share
You can use the sanitize method.
There is also a Sanitize gem.
I tend to prefer the Sanitize gem because it can be used as a before_save filter in your models instead of having to use the sanitize method in each of your views.