Skip to content
Snippets Groups Projects
Commit 843f95fc authored by Liam Morland's avatar Liam Morland
Browse files

Issue #3109697: Refactor encoding of end-of-line characters

parent d3d3451e
No related branches found
No related tags found
No related merge requests found
......@@ -32,8 +32,7 @@ class FillPdfMappingHelper {
$split = explode('|', $replacement);
// Sometimes it isn't; don't know why.
if (count($split) == 2) {
$return[$split[0]] = preg_replace('|<br />|', '
', $split[1]);
$return[$split[0]] = preg_replace('|<br />|', "\n", $split[1]);
}
}
}
......
......@@ -122,8 +122,7 @@ class TokenResolver implements TokenResolverInterface {
$resolved_string = str_replace(array_keys($replacements), array_values($replacements), $text);
// Replace <br /> occurrences with newlines.
$resolved_string = preg_replace('|<br />|', '
', $resolved_string);
$resolved_string = preg_replace('|<br />|', "\n", $resolved_string);
// Apply transformation replacements.
if (isset($options['replacements'][$resolved_string])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment