Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sanitize input XSS and HTML input in rails

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.

like image 925
Zakir Hemraj Avatar asked Oct 18 '09 02:10

Zakir Hemraj


1 Answers

What about the xss_terminate plugin ?

like image 114
Reuben Mallaby Avatar answered Sep 18 '22 13:09

Reuben Mallaby