I'm using HAML to make html templates but am having a problem in writing attributes which will be replaced with JavaScript string templating.
The line in question looks like this:
%div{:class => "<%= from_class %>"}
HAML tries to encode the <%= %> tags:
<div class="<%= from_class %>">
I don't want that to happen in this case... Anyone know how to do this?
From stackoverflow
-
In the next version of Haml (3.1), there will be an
:escape_attrs
option that you'll be able to set tofalse
to prevent this. You'll also be able to pass--no-escape-attrs
on the command line. To use this right now, you can install the alpha version withgem install haml --prerelease
.
0 comments:
Post a Comment