diff options
author | 3D-I <480857+3D-I@users.noreply.github.com> | 2019-10-28 02:34:59 +0100 |
---|---|---|
committer | 3D-I <480857+3D-I@users.noreply.github.com> | 2019-10-28 02:36:35 +0100 |
commit | 2cdc2e751eb03b6ba6c34889dc3db2a301b8c326 (patch) | |
tree | de778c01abdc96dd7d9b82f87c908b76cdb99f21 /phpBB/includes/acp/acp_forums.php | |
parent | 6600fc6cad5f6d43acdcc9a303be4ce91ed48f2e (diff) | |
download | forums-2cdc2e751eb03b6ba6c34889dc3db2a301b8c326.tar forums-2cdc2e751eb03b6ba6c34889dc3db2a301b8c326.tar.gz forums-2cdc2e751eb03b6ba6c34889dc3db2a301b8c326.tar.bz2 forums-2cdc2e751eb03b6ba6c34889dc3db2a301b8c326.tar.xz forums-2cdc2e751eb03b6ba6c34889dc3db2a301b8c326.zip |
[ticket/16151] Enable Emojis and rich text in forum name
Move to a new function()
PHPBB3-16151
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 0bbaf96dec..d31404fa22 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -987,24 +987,14 @@ class acp_forums } /** - * Replace Emojis and other 4bit UTF-8 chars not allowed by 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', $forum_data_ary['forum_name'], $matches)) - { - foreach ($matches as $key => $emoji) - { - $forum_data_ary['forum_name'] = str_replace($emoji, utf8_encode_ncr($emoji), $forum_data_ary['forum_name']); - } - } + $forum_data_ary['forum_name'] = utf8_encode_ucr($forum_data_ary['forum_name']); /** * This should never happen again. - * Leaving the fallback hre just in case there will be the need of it. + * Leaving the fallback here just in case there will be the need of it. */ if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $forum_data_ary['forum_name'], $matches)) { |