From aad8ffff5180c120f0aa49beadc06ca637f15cbb Mon Sep 17 00:00:00 2001 From: 3D-I Date: Tue, 11 Jun 2019 05:41:12 +0200 Subject: [PATCH 1/2] [ticket/15211] Fix Emoji characters in forum name PHPBB3-15211 --- phpBB/includes/acp/acp_forums.php | 7 +++++++ phpBB/language/en/acp/forums.php | 1 + 2 files changed, 8 insertions(+) diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index be5a7a2f26..cb0593b14a 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -986,6 +986,13 @@ class acp_forums $errors[] = $user->lang['FORUM_NAME_EMPTY']; } + // No Emojis + if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $forum_data_ary['forum_name'], $matches)) + { + $character_list = implode('
', $matches[0]); + $errors[] = $user->lang('FORUM_NAME_EMOJI', $character_list); + } + if (utf8_strlen($forum_data_ary['forum_desc']) > 4000) { $errors[] = $user->lang['FORUM_DESC_TOO_LONG']; diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index 7a7176369f..341b722c5b 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -97,6 +97,7 @@ $lang = array_merge($lang, array( 'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.', 'FORUM_NAME' => 'Forum name', 'FORUM_NAME_EMPTY' => 'You must enter a name for this forum.', + 'FORUM_NAME_EMOJI' => 'The forum name you entered is invalid.
The value contains the following unsupported characters:
%s', 'FORUM_PARENT' => 'Parent forum', 'FORUM_PASSWORD' => 'Forum password', 'FORUM_PASSWORD_CONFIRM' => 'Confirm forum password', From 608cf00aea009c6877abb299a8ccfbb75e3d7487 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Wed, 12 Jun 2019 15:04:38 +0200 Subject: [PATCH 2/2] [ticket/15211] Wording PHPBB3-15211 --- phpBB/language/en/acp/forums.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index 341b722c5b..d92d3f8c9e 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -97,7 +97,7 @@ $lang = array_merge($lang, array( 'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.', 'FORUM_NAME' => 'Forum name', 'FORUM_NAME_EMPTY' => 'You must enter a name for this forum.', - 'FORUM_NAME_EMOJI' => 'The forum name you entered is invalid.
The value contains the following unsupported characters:
%s', + 'FORUM_NAME_EMOJI' => 'The forum name you entered is invalid.
It contains the following unsupported characters:
%s', 'FORUM_PARENT' => 'Parent forum', 'FORUM_PASSWORD' => 'Forum password', 'FORUM_PASSWORD_CONFIRM' => 'Confirm forum password',