1

Just upgraded Rails to 2.3.5 to get the lovely looking rails_xss plugin but I've noticed one big issue with it. Any content_for blocks are escaped when yielded.

I've tried hacking it around by doing the either of following but they do not work:

<% @content_for_foo.html_safe! -%>
<%= yield raw :foo %>
DEfusion
  • 5,533
  • 5
  • 44
  • 60

1 Answers1

2

Try <%= raw yield :foo %>

Grant Hutchins
  • 4,275
  • 1
  • 27
  • 32
  • You sir, are my hero! I couldn't figure out why none of the content_for stuff was working for me! – J.R. May 18 '10 at 18:57