diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index 33ee07c3c212..5780ec1b1da8 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -262,6 +262,10 @@ class TemplateEngine public static function wrapElementsIntoTables(string $wrapper, string $body, $settings): ?string { + $wrapper = $wrapper == strip_tags($wrapper) + ? '
' + : $wrapper; + $documents['wrapper'] = new \DOMDocument(); $documents['wrapper']->loadHTML($wrapper); diff --git a/resources/views/email/template/plain.blade.php b/resources/views/email/template/plain.blade.php index 910e93e31ad5..c896a646f184 100644 --- a/resources/views/email/template/plain.blade.php +++ b/resources/views/email/template/plain.blade.php @@ -8,47 +8,24 @@ Invoice Ninja - - +
+ {!! $body !!} +
+ +@if($signature) - -
- - - - - @if($signature) - - - - @endif - - @isset($whitelabel) - @if(!$whitelabel) - - @endif - @endif - -
- - - - -
- {!! $body !!} -
-
-

{!! $signature !!}

-
-

- - {{ __('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }} - -

-
+
+

{!! $signature !!}

- - - +@endif +@isset($whitelabel) + @if(!$whitelabel) +

+ + {{ __('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }} + +

+ @endif +@endisset