aboutsummaryrefslogtreecommitdiff
path: root/phpBB
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2020-01-02 21:40:36 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2020-01-02 21:41:36 +0100
commit9f033cbf6dbd04553384f969fe0eefc61ab60258 (patch)
tree08aa9226f55950ee0827963f59ec82e59014763b /phpBB
parent[ticket/15079] Fix Emoji and rich text in Draft subject (diff)
downloadphpbb-9f033cbf6dbd04553384f969fe0eefc61ab60258.tar.gz
phpbb-9f033cbf6dbd04553384f969fe0eefc61ab60258.tar.bz2
phpbb-9f033cbf6dbd04553384f969fe0eefc61ab60258.zip
[ticket/15079] Fix Emoji and rich text in Draft subject
User can save Emoji in drafts since the topic title is checked on post submission already. Moreover this way the draft can not be lost somehow. PHPBB3-15079
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/posting.php19
1 files changed, 1 insertions, 18 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 48c2d8da6a..27b75bf56d 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -739,25 +739,8 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && (
/**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
- * Check the permissions for posting Emojis first.
*/
- if ($auth->acl_get('u_emoji'))
- {
- $subject = utf8_encode_ucr($subject);
- }
- else
- {
- /**
- * Check for out-of-bounds characters that are currently
- * not supported by utf8_bin in MySQL
- */
- if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $subject, $matches))
- {
- $character_list = implode('<br>', $matches[0]);
-
- trigger_error($user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list));
- }
- }
+ $subject = utf8_encode_ucr($subject);
if ($subject && $message)
{