Replace incorrect opening mso if in postProcessTemplate

[MAILPOET-3468]
This commit is contained in:
Jan Lysý
2021-08-03 09:44:11 +02:00
committed by Veljko V
parent 75690d7a45
commit dfa0d03a67

View File

@ -217,9 +217,12 @@ class Renderer {
foreach ($templateDom->query('img') as $image) {
$image->src = str_replace(' ', '%20', $image->src);
}
// because tburry/pquery contains a bug and replaces the opening non mso condition incorrectly we have to replace the opening tag with correct value
$template = $templateDom->__toString();
$template = str_replace('<!--[if !mso]><![endif]-->', '<!--[if !mso]><!-- -->', $template);
$template = WPFunctions::get()->applyFilters(
self::FILTER_POST_PROCESS,
$templateDom->__toString()
$template
);
return $template;
}