minor regex optimization to convert br to eol

This commit is contained in:
Geoffray 2014-11-01 09:35:31 +01:00
parent 56983f0365
commit 928d37c25f

View File

@ -351,7 +351,7 @@ class Message
} }
} else { } else {
if (!isset($this->plaintextMessage) && isset($this->htmlMessage)) { if (!isset($this->plaintextMessage) && isset($this->htmlMessage)) {
$output = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, trim($this->htmlMessage) ); $output = preg_replace('/\s*\<br\s*\/?\>/i', PHP_EOL, trim($this->htmlMessage) );
$output = strip_tags($output); $output = strip_tags($output);
return $output; return $output;