I read and tested that simple_format
allows certain html tags.
Is that safe enough to protect again xss? (assuming I don't mind user will put html to make their text pretty) Could this result in xss? or should I keep with h
method?
It looks like there was a vulnerability in rails 4.0.0 and 4.0.1 that has now been resolved, so it should be safe. Here's a link to the issue: https://groups.google.com/forum/#!topic/ruby-security-ann/5ZI1-H5OoIM
h
method and usesimple_format
. They're mutually exclusive. – meagar♦simple_format
. As stated in the document, it attempts to sanitize its input. – meagar♦