jdrouet / mrml

Implementation of mjml in rust
MIT License
346 stars 22 forks source link

Allow Sendgrid unsubscribe tags #470

Open simoheinonen opened 1 month ago

simoheinonen commented 1 month 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 day 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.