diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/functions.php b/core/functions.php index 558acf2..1e786ed 100644 --- a/core/functions.php +++ b/core/functions.php @@ -184,7 +184,7 @@ function getEmoticons(): array { function parseEmoticons($string): string { foreach(getEmoticons() as $emoticon => $data) { $pattern = '#(^|\s)'.preg_quote($emoticon).'#'; - $replace = " <span title=\"{$data[1]}\">{$data[0]}</span>"; + $replace = "\\1<span title=\"{$data[1]}\">{$data[0]}</span>"; $string = preg_replace($pattern, $replace, $string); } @@ -222,7 +222,7 @@ function getUnicodeEmoticons(): array { function parseUnicodeEmoticons($string): string { foreach(getUnicodeEmoticons() as $emoticon => $explanation) { $pattern = '#(^|\s)'.preg_quote($emoticon).'#'; - $replace = " <span title=\"{$explanation}\">{$emoticon}</span>"; + $replace = "\\1<span title=\"{$explanation}\">{$emoticon}</span>"; $string = preg_replace($pattern, $replace, $string); } |