Rails 3: simple_format not printing "< xx >"
I want to print text to HTML. I'm using si开发者_Go百科mple_format, however everything seems to be right except that what is inside "< >" is not printed.
Thanks.
You can pass in a :sanitize
option to tell it not to sanitize your tags:
<%= simple_text(my_string, nil, :sanitize => false) %>
精彩评论