Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent apostrophe encoding in generated html #471

Open
jbtheard opened this issue Jun 12, 2023 · 3 comments
Open

Prevent apostrophe encoding in generated html #471

jbtheard opened this issue Jun 12, 2023 · 3 comments

Comments

@jbtheard
Copy link

jbtheard commented Jun 12, 2023

Describe the bug
I'm trying to output a link for my CRM that is a liquid tag (that will be replaced by my CRM at the time of effectively sending email)
It's actually the default unsubscribe tag for customer.io: {% unsubscribe_url lang='en' %}

To Reproduce
My code is pretty much this:

<MjmlText>
  <a href="{% unsubscribe_url lang='en' %}">Unsubscribe</a>
</MjmlText>

The html output is as follow

<div><a href="{% unsubscribe_url lang=&#x27;en&#x27; %}">Unsubscribe</a></div>

As you can see, apostrophes have been encoded which will make my CRM unable to use that template.

Expected behavior
we could have an option to prevent output html to encode some character and result in

<div><a href="{% unsubscribe_url lang='en' %}">Unsubscribe</a></div>
@psugihara
Copy link
Collaborator

hmm, I'm up for some version of this but I'm not sure the best way to implement. I think we'd either need to re-parse the output from mjml-react or figure out a way that they can support it via an option.

@jbtheard
Copy link
Author

Perhaps some inspiration with Maizzle replaceString() ?

@jbtheard
Copy link
Author

Hi there, will this ever be done ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants