Skip to content
Snippets Groups Projects
Commit 6ddfd8b7 authored by JediKev's avatar JediKev
Browse files

issue: Drop Gmail "ltr" Attributes

This addresses an issue where the New Activity Notice Template was not
keeping the CSS styling for the %{message} variable. This was due to Gmail
adding `<div dir="ltr">` tags around some text in the body causing the CSS
styling to break. This adds RegEx to the formatter so we can remove the
`<div dir="ltr">` tags from the email body before the New Activity Notice
Template is sent preserving the CSS styling.
parent bbb86728
No related branches found
No related tags found
No related merge requests found
......@@ -306,8 +306,9 @@ class Format {
':<!DOCTYPE[^>]+>:', # <!DOCTYPE ... >
':<\?[^>]+>:', # <?xml version="1.0" ... >
':<html[^>]+:i', # drop html attributes
':<div dir=(3D)?"ltr">(.*?)<\/div>(.*):is', # drop Gmail "ltr" attributes
),
array('', '', '', '', '<html'),
array('', '', '', '', '<html', '$2 $3'),
$html);
// HtmLawed specific config only
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment