\" is not printed." />
开发者

Rails 3: simple_format not printing "< xx >"

开发者 https://www.devze.com 2023-03-03 18:10 出处:网络
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.

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) %>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号