Skip to content

Commit

Permalink
It's best to add after <body> after but make sure it handles if the t…
Browse files Browse the repository at this point in the history
…ag has any attribute
  • Loading branch information
romaincazier committed Jan 13, 2023
1 parent f06f9b5 commit f8b053f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PageMjmlToHtml.module
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class PageMjmlToHtml extends WireData implements Module, ConfigurableModule {
$view .= "</pre>";
$view .= "<div>";
if($mjml->code === 200) {
$view = str_replace("</body>", "$view</body>", $mjml->html);
$view = preg_replace('/(<body.*>)/mU', '$1'.$view, $mjml->html);
} else {
$debug = true;
$view .= "<div class=\"error\">";
Expand Down

0 comments on commit f8b053f

Please sign in to comment.