Fix newline trim
When using with <br /> format it now allows for 'b' and 'r' chars at the end of last line. I think rtrim is not suitable when used with a word rather than a charlist.
This commit is contained in:
@@ -379,7 +379,7 @@ class AddressFormatCore extends ObjectModel
|
||||
$addressText .= (!empty($tmpText)) ? $tmpText.$newLine: '';
|
||||
}
|
||||
|
||||
$addressText = rtrim($addressText, $newLine);
|
||||
$addressText = preg_replace('/'.preg_quote($newLine,'/').'$/i', '', $addressText);
|
||||
$addressText = rtrim($addressText, $separator);
|
||||
|
||||
return $addressText;
|
||||
|
||||
Reference in New Issue
Block a user