Mjml: Parse error on '<' exist not in tag part of code

Created on 31 Oct 2017  路  9Comments  路  Source: mjmlio/mjml

At first, big thanks of your working on mjml! It's amazing framework for mails. We opened it now and will use them all our future! It's perfect!

But I got issue when i create a lot of templates with already saved template codes (from IPS4 platform).

Here is some examples.
Good parse:
good-parse

Parsing error:
error-parse

Thanks for you!

All 9 comments

Easy temporary solution - just change varibales order
err-fixed

Hi @Satariall

I think this is due to the engine think that you're opening a tag. Simple fix for that is to encode the < in HTML with &lt;

Hi @iRyusa. Thanks for the answer! But i can't change this symbol to <. Because after mjml template generation it will transfer to the second generator part, which do additional logic. Content in { } or {{ }} must be executable for this generator. With < it will be as incorrect part or not compilable text.

I didn't know best solution for fix that situation. I am just notify about that not good thing (and for search for other people). If somebody can dream good way for that - it will be cool. If not.. Ok. We'll just know about that.

Thanks.

It might be easier to switch the order. First apply the logic to add data and conditionals to the template, and pass the resulting mjml to the cli

@rogierslag in that order we need compile mjml at every time on mail need to send. We send very much mails and that way isn't good. Moreover, we need to install mjml on the server (on each cluster nodes), support, monitore and operate them. Realy hard way. Better way is create in any hand work one time in mjml app and get the result as a template for futher mailings.
Thanks for you care :)

We had the same problem, and build maily to handle it for us. You can use it as well. I also made some blogs about it

@Satariall did you tried it because it will be decoded as < in the output html ?

@iRyusa i understand you. Thanks. Tried it and yes, you right. Output HTML from MJML App for &lt; is decoded < symbol. I not tried that before (sorry) because i think mjml must not convert encoded symbols to the real.

Yes, I think it won't happens anymore in MJML4. So I can close this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kytosai picture kytosai  路  4Comments

karanmartian picture karanmartian  路  3Comments

iwanaga-sakura picture iwanaga-sakura  路  4Comments

lucasnantonio picture lucasnantonio  路  4Comments

ghost picture ghost  路  4Comments