Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将文本打印到 HTML。我正在使用 simple_format,但一切似乎都是正确的,只是没有打印“< >”中的内容。
谢谢。
你可以传入一个:sanitize选项来告诉它不要清理你的标签:
:sanitize
<%= simple_text(my_string, nil, :sanitize => false) %>