jdrouet / mrml

Implementation of mjml in rust
MIT License
361 stars 23 forks source link

Allow Sendgrid unsubscribe tags #470

Closed simoheinonen closed 1 month ago

simoheinonen commented 2 months ago
<mjml>
    <mj-body>
        <a href="<%asm_group_unsubscribe_raw_url%>">unsubscribe</a>
    </mj-body>
</mjml>

couldn't parse document: something went wront while parsing invalid attribute at 3:11 cause expected '"' not '<' at 3:18

https://www.twilio.com/docs/sendgrid/ui/sending-email/group-unsubscribes

jdrouet commented 1 month ago

So this issue comes from xmlparser which we use under the hood to parse the template. That being said, this is a real problem and what you ask should be possible. I'm on it.

In the meantime, you can probably replace it with a placeholder and replace it after rendering it.