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:
1 parent
d1959f87d4
commit
39ded96964
1 file changed
+1
-1
@@ -379,7 +379,7 @@ class AddressFormatCore extends ObjectModel
|
|||||||
$addressText .= (!empty($tmpText)) ? $tmpText.$newLine: '';
|
$addressText .= (!empty($tmpText)) ? $tmpText.$newLine: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$addressText = rtrim($addressText, $newLine);
|
$addressText = preg_replace('/'.preg_quote($newLine,'/').'$/i', '', $addressText);
|
||||||
$addressText = rtrim($addressText, $separator);
|
$addressText = rtrim($addressText, $separator);
|
||||||
|
|
||||||
return $addressText;
|
return $addressText;
|
||||||
|
|||||||
Reference in new issue
Block a user