- Fixes rendering issue where DOMDocument throws a notice on unescaped

html entity
This commit is contained in:
Vlad
2016-06-07 12:27:40 -04:00
parent 329ec63dfd
commit 713dda913e

View File

@ -92,12 +92,16 @@ class Renderer {
} }
function postProcessTemplate($template) { function postProcessTemplate($template) {
// replace all !important tags except for in the body tag
$DOM = $this->DOM_parser->parseStr($template); $DOM = $this->DOM_parser->parseStr($template);
$template = $DOM->query('.mailpoet_template'); $template = $DOM->query('.mailpoet_template');
// replace all !important tags except for in the body tag
$template->html( $template->html(
str_replace('!important', '', $template->html()) str_replace('!important', '', $template->html())
); );
// encode ampersand
$template->html(
str_replace('&', '&', $template->html())
);
$template = apply_filters( $template = apply_filters(
'mailpoet_rendering_post_process', 'mailpoet_rendering_post_process',
$DOM->__toString() $DOM->__toString()