Open Schweriner opened 4 years ago
I do not know mjml framework yet, but can you explain, why comments in HTML for end-users should be keept?
The framework uses comments to display / hide certain parts of the email templates. Something like:
<!--[if !mso]><!-->
<style type="text/css">
@media only screen and (max-width:480px) {
@-ms-viewport { width:320px; }
@viewport { width:320px; }
}
</style>
<!--<![endif]-->
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<!--[if lte mso 11]>
<style type="text/css">
.outlook-group-fix { width:100% !important; }
</style>
<![endif]-->
Good point. Accepted from my side.
reminder
// Remove useless HTML comments
if (substr($this->dmailer['boundaryParts_html'][$bKey][0], 1) == 'END') {
$this->dmailer['boundaryParts_html'][$bKey][1] = $this->removeHTMLComments($this->dmailer['boundaryParts_html'][$bKey][1]);
}
Im using the mjml framework for a Newsletter which contains alot of HTML comments. Some important comments of the framework are getting removed when sending the Newsletters. There should be a setting to prevent direct_mail from removing HTML Comments