Rails 3: simple_format not printing “< xx >”
-
29-10-2019 - |
Question
I want to print text to HTML. I'm using simple_format, however everything seems to be right except that what is inside "< >" is not printed.
Thanks.
Solution
You can pass in a :sanitize
option to tell it not to sanitize your tags:
<%= simple_text(my_string, nil, :sanitize => false) %>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow