aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2019-10-28 21:14:57 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2019-10-28 21:16:54 +0100
commitc569d0dabc0868356c2c2f6bdf796c6433756fa2 (patch)
treefbd2786b00cab78972d071df2cdb83eb5889a458
parentd136a8a9078b02433f4be08420486ad05c8129bd (diff)
downloadforums-c569d0dabc0868356c2c2f6bdf796c6433756fa2.tar
forums-c569d0dabc0868356c2c2f6bdf796c6433756fa2.tar.gz
forums-c569d0dabc0868356c2c2f6bdf796c6433756fa2.tar.bz2
forums-c569d0dabc0868356c2c2f6bdf796c6433756fa2.tar.xz
forums-c569d0dabc0868356c2c2f6bdf796c6433756fa2.zip
[ticket/16153] Use new function
PHPBB3-16153
-rw-r--r--phpBB/posting.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 5bba052a6a..9f3b26aa85 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1182,20 +1182,10 @@ if ($submit || $preview || $refresh)
}
/**
- * Replace Emojis and other 4bit UTF-8 chars, not allowed by utf8_bin MySql, to NCR.
+ * Replace Emojis and other 4bit UTF-8 chars not allowed by MySql to UCR / NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
- * Doesn't interfere with Japanese or Cyrillic etc.
- *
- * @see https://www.w3.org/TR/xml11/
- * @see https://www.opentag.com/xfaq_charrep.htm
*/
- if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
- {
- foreach ($matches as $key => $emoji)
- {
- $post_data['post_subject'] = str_replace($emoji, utf8_encode_ncr($emoji), $post_data['post_subject']);
- }
- }
+ $post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']);
/**
* This should never happen again.