magento-hackathon / Responsive-Email-Templates-with-CSS-Inliner

Idea from Kalen Jordan. We can take http://zurb.com/ink/ as a base.
https://github.com/orgs/magento-hackathon
31 stars 10 forks source link

The template variables look like they're getting messed up #2

Closed kalenjordan closed 10 years ago

kalenjordan commented 10 years ago

It looks like the template variables (ex: {{var logo_url}}) might be getting converted to html entities by the html in-lining, before the template variables are parsed and injected.

avstudnitz commented 10 years ago

You're right, that might be a problem. I didn't think about that. If we want to inline after the variables get replaced, we have to look for a different approach.

kalenjordan commented 10 years ago

I was thinking maybe we just hack it and after the inlining replace all of the { and } html entities with the regular characters.

If not that, then we just go back to a simple rewrite of the email template module.

kalenjordan commented 10 years ago

It must have been the other inliner (InlineStyle) that I had tried which caused problems. I just tested this again with our original (and current) inliner TijsVerkoyen_CssToInlineStyles and it works fine.

kalenjordan commented 10 years ago

Actually, it's the {{var logo_url}} specifically inside of <img src="..."> which causes a problem. It must have some logic that converts things to html entities if they are inside quotes.

Back to my hack :)

kalenjordan commented 10 years ago

Okay so the inliner seems to be url encoding template variables inside of <img src="..."> so I added some logic to undo that.