question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outlook conditional syntax not right (?)

See original GitHub issue

Reproduction Steps:

  1. Go to https://mjml.io/try-it-live
  2. Click on “View HTML”
  3. You’ll see an error on line 8: “Unexpected character in comment found”

Expected behavior: I expect a conditional statement for Outlook to look like this:

<!--[if !mso]> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <![endif]-->

Observed behavior: They look the one below, with an extra HTML comment:

<!--[if !mso]><!-- --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--<![endif]-->

MJML version: Not sure. Whatever is being used on https://mjml.io/try-it-live

It confuses my Visual Studio Code editor and throws errors in Sendgrid. If this is supposed to be like this, can I read about it somewhere?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
iRyusacommented, Jul 19, 2018

That’s intentional and the fix is described here https://www.emailonacid.com/blog/article/email-development/prevent-ie-edge-meta-tag-from-breaking-images-in-live-mail/

On 19 Jul 2018, at 11:33, Dave van Hoorn notifications@github.com wrote:

<meta http-equiv="X-UA-Compatible" content="IE=edge">
0reactions
iRyusacommented, Sep 11, 2018

Well you can pretty much ignore the error inside the try it live because it’s not really accurate ( like the error in the try it live left part are completely related to XML, not MJML )

MJML already use an external minifier tool ( https://github.com/kangax/html-minifier ) and we don’t have any issue with our input

Read more comments on GitHub >

github_iconTop Results From Across the Web

Outlook Conditional Code - Email2Go
Using conditional comments in HTML emails to target Outlook.
Read more >
Using IF with AND, OR and NOT functions - Microsoft Support
How to use the IF function (combined with the AND, OR, and NOT functions) in Excel to make logical comparisons between given values....
Read more >
HTML Email Conditional Statements
Conditional statements are comprised of “if” statements that dictate whether or not the action inside of the statement should be executed in your...
Read more >
Nested IF in Excel – formula with multiple conditions - Ablebits
If the condition of the 1st If function is not met, then test the 2nd If statement, and so on. IF(check if B2>=249,...
Read more >
Boolean search with multiple criteria in Outlook (AND and OR ...
Can I also perform Boolean and multi criteria searches in Outlook without ... when you know the correct search query syntax and field...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found