Replaces spaces in image URLs

This commit is contained in:
Vlad
2017-11-21 21:01:36 -05:00
parent ec3bb5b95c
commit e7ffe4d694
3 changed files with 13 additions and 8 deletions

View File

@@ -130,6 +130,10 @@ class Renderer {
function postProcessTemplate($template) {
$DOM = $this->DOM_parser->parseStr($template);
// replace spaces in image tag URLs
foreach($DOM->query('img') as $image) {
$image->src = str_replace(' ', '%20', $image->src);
}
$template = $DOM->query('.mailpoet_template');
// replace all !important tags except for in the body tag
$template->html(