Patches: Browse | Submit New | Admin
<%= "hello" if true %> is converted to: Erubis::XmlHelper.escape_xml( "hello" if true ) which is an invalid expression. Wrapping the code block in params fixes this issue. Not sure if it applies generaly however. --- lib/erubis/engine/eruby.rb.bak 2007-11-13 13:03:03.000000000 -0700 +++ lib/erubis/engine/eruby.rb 2007-11-13 13:20:41.000000000 -0700 @@ -33,7 +33,7 @@ end def escaped_expr(code) - return "#{@escapefunc}(#{code})" + return "#{@escapefunc}((#{code}))" end #--
Add A Comment: