I’m guessing your problem is that the href attribute value is being escaped:
%a{ :href => '<%= href %>'}
is becoming
<a href='<%= href %>'>
If so, you can use the :escape_attrs option to not escape attribute values.
A complete example:
require 'haml'
puts Haml::Engine.new(DATA.read, :escape_attrs => false).render
__END__
%script#album-row{ :type => 'text/template' }
.album-row
%a{ :href => '<%= href %>'}
<%= name %>
This should produce
<a href='<%= href %>'>
for the line in question.
Note this setting applies to all attributes in your document, you can’t
currently selectively escape only some attributes.
If that’s a problem you could try changing the inderscore template deliminator
as Les suggests (I haven’t actually used underscore).
Matt
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.