Disable XSS and HTML Sanitization in Rails 3
问题 I'm having an issue where when I have the contents of my rich text editor saved into the database using activerecord the html content is stripped of the html contents (I think it fires html_safe on it). I tried overriding the html_safe method on the content string, but nothing works. content = "<p>hello</p>" @article.content = content puts @article.content # "<p>hello</p>" @article.save puts @article.content # "<>hello</>" How can you override the html stripping capabilities in activerecord