R – Sanitize input XSS and HTML input in rails

inputruby-on-railssanitizexss

I know I can use the ActionView helper strip_tags method in my views to sanitize output, but what is the best way to sanitize user input before I persist it to my db? Should I find a way to include the view helper in my controller and reuse the strip_tags method? I thought rails would have something available globally to do something like this.

Best Answer

What about the xss_terminate plugin ?