0

在 rails 2 中,我使用 <%=h %> 来显示由 RedCloth 生成的 HTML,但在 Rails 3 中我该如何做到这一点?

<%= raw RedCloth.new(@review).to_html %>
4

1 回答 1

1

使用<%= raw %>.

参考:raw vs. html_safe vs. h to unescape html

于 2011-04-22T01:54:23.600 回答