Rails 2.3.5 with rails_xss escaping content_for yielded content

Posted by DEfusion on Stack Overflow See other posts from Stack Overflow or by DEfusion
Published on 2009-12-04T23:06:31Z Indexed on 2010/05/25 17:51 UTC
Read the original article Hit count: 203

Filed under:
|
|

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 %>

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about xss