Render html in label_tag in Rails 3.2.11 (html_safe, raw not working)
问题 Using: Rails 3.2.11 & Ruby 1.8.7 I am having some serious problem trying to make label_tag output html. Basically it boils down to: <%= label_tag "This will <strong>not</strong> work!" %> I have tried: <%= raw label_tag "This will <strong>not</strong> work!" %> <%= label_tag raw "This will <strong>not</strong> work!" %> <%= label_tag "This will <strong>not</strong> work!".html_safe %> <%= (label_tag "This will <strong>not</strong> work!").html_safe %> I have installed the gem 'rails_xss'.