diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 7719ce5afa..3f2e0ab8cb 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -323,6 +323,9 @@ class factory implements \phpbb\textformatter\cache_interface // Only parse emoticons at the beginning of the text or if they're preceded by any // one of: a new line, a space, a dot, or a right square bracket $configurator->Emoticons->notAfter = '[^\\n .\\]]'; + + // Ignore emoticons that are immediately followed by a "word" character + $configurator->Emoticons->notBefore = '\\w'; } // Load the censored words diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.html b/tests/text_processing/tickets_data/PHPBB3-15348.html new file mode 100644 index 0000000000..e65925ec28 --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-15348.html @@ -0,0 +1 @@ +:o k: :ok: \ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.txt b/tests/text_processing/tickets_data/PHPBB3-15348.txt new file mode 100644 index 0000000000..d6b971702c --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-15348.txt @@ -0,0 +1 @@ +:o k: :ok: \ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.xml b/tests/text_processing/tickets_data/PHPBB3-15348.xml new file mode 100644 index 0000000000..0c88c8824f --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-15348.xml @@ -0,0 +1,33 @@ + + + + smiley_id + code + emotion + smiley_url + smiley_width + smiley_height + smiley_order + display_on_posting + + 13 + :o + First half of :ok: + icon_e_surprised.gif + 15 + 17 + 14 + 1 + + + 99 + k: + Second half of :ok: + icon_lol.gif + 15 + 17 + 22 + 1 + +
+