- Fixes rendering issue where DOMDocument throws a notice on unescaped
html entity
This commit is contained in:
@ -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()
|
||||||
|
Reference in New Issue
Block a user