表单标签标签中的HTML实体/特殊字符

时间:2011-04-09 05:13:19

标签: ruby-on-rails ruby forms special-characters html-entities

<%= f.label :recipient_email, "Friend&rsquo;s email address" %>

&rsquo;不会显示为实际角色。什么是正确的方法?

1 个答案:

答案 0 :(得分:11)

<%= f.label :recipient_email, raw("Friend&rsquo;s email address") %>