inky
inky copied to clipboard
Inliner still converts "=" to = and "&" to & and other special characters.
I've read the work being done on this issue, but I am using Foundation v2.2.1 and it is not fixed. Here's an example:
In my layout file I have the following code:
<a href="{{email.url}}{{email.urlsuffix}}{{womens}}</a>
These refer to the following front matter in the page:
---
url: "https://myurl.com"
urlsuffix: "/sfc3/index.cfm?changeWebsite=US_en"
womens: "&route=c_store.browseProductsByCategory&CategoryId=c4"
---
Foundation parses it like this:
<a href="https://myurl.com/sfc3/index.cfm?changeWebsite=US_en&route=c_store.browseProductsByCategory&CategoryId=c4</a>
That doesn't work for most email clients, and I can't manually find/replace all the instances by hand.
Could someone please help me with this issue? It's a real show-stopper for the project I'm working on, and I'm not getting anywhere with the existing solutions out there.
same problem here!
I think the problem is here
// lib/inky.js
// // Because the structure of the DOM constantly shifts, we carefully go through each custom tag one at a time, until there are no more custom tags to parse
while ($(tags).length > 0) {
var elem = $(tags).eq(0);
var newHtml = this.componentFactory(elem); <------- HERE
console.log("newHtml",newHtml)
elem.replaceWith(newHtml);
}
This has to do with handlebars. I had the same problem and fixed it by using three curly brackets: {{{womens}}}
Handlebars HTML-escapes values returned by a {{expression}}. If you don't want Handlebars to escape a value, use the "triple-stash", {{{
from http://handlebarsjs.com/expressions.html
I see this is an old issue but I'm having trouble with this converting &
to &
in button URLs which my front-end application framework also mis-handles, but shouldn't be encoded in the first place I don't think.