Skip to content

haml6 & string interpolation escapes #1084

Description

@jdelStrother

Thanks for haml6! But I'm puzzled by a change we're seeing with it in our Rails 7.0.3 app. A template like this:

%div
  %p= link_to "link1", "/"
  %p click #{link_to "link2", "/"}

Generates this html in haml 5.2.2:

<div>
<p><a href="/">link1</a></p>
<p>click <a href="/">link2</a></p>
</div>

But generates this html in haml 6.0.0:

<div>
<p><a href="/">link1</a></p>
<p>click &lt;a href=&quot;/&quot;&gt;link2&lt;/a&gt;</p>
</div>

Should we still be able to use foo #{html_safe_string} bar without html_safe_string getting over-escaped?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions