Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.

& instead of & in queryString attachment #45

Open
piotr17 opened this issue May 15, 2017 · 2 comments
Open

& instead of & in queryString attachment #45

piotr17 opened this issue May 15, 2017 · 2 comments

Comments

@piotr17
Copy link

piotr17 commented May 15, 2017

I'm using queryString option to create a Google Analytics link with utm parameters.

Premailer convert the & conjiunction with the entity, breaking the link monitoring.

Correct link  ?utm_source=SOURCENAME?utm_medium=MEDIUNAME
Premailer output: ?utm_source=SOURCENAME&utm_medium=MEDIUNAME
@dwightjack
Copy link
Owner

I believe that's the correct behavior, if the & isn't encoded it would break html validation , isn't it?

@piotr17
Copy link
Author

piotr17 commented May 23, 2017

Sorry, my issue was not clear (and i've made a little mistake in the "correct link").
It's perfectly right that the final url should have the encoded &, even if now HTML5 it's less strict on it.

But the scope (in my case and i think for many other users) is to use your plug-in for manipulating the code before using it in an Email Marketing Platform such as Mailup or Mailchimp. In these cases the code will be parsed by the internal converter that will encode the & of "&" once again, risking of breaking the tracking paramenter. Maybe for the future it could be interesting to have an option of enconding or not the &, depending on the final sending system.

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

No branches or pull requests

2 participants