diff options
author | 2020-01-20 17:28:24 +0100 | |
---|---|---|
committer | 2020-01-20 17:28:24 +0100 | |
commit | d7be6e037bb65a30fbcffc2258d6ca640be4d0e5 (patch) | |
tree | 60b5597dd80c2285acbf7d5cd3b61b325d5da180 | |
parent | Merge pull request #5813 from 3D-I/ticket/15712 (diff) | |
parent | [ticket/15079] Fix Emoji and rich text in Draft subject (diff) | |
download | phpbb-d7be6e037bb65a30fbcffc2258d6ca640be4d0e5.tar.gz phpbb-d7be6e037bb65a30fbcffc2258d6ca640be4d0e5.tar.bz2 phpbb-d7be6e037bb65a30fbcffc2258d6ca640be4d0e5.zip |
Merge pull request #5814 from 3D-I/ticket/15079
[ticket/15079] Fix Emoji and rich text in subject of post draft
-rw-r--r-- | phpBB/posting.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 57b52320a3..27b75bf56d 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -736,6 +736,12 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( $subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject; $message = $request->variable('message', '', true); + /** + * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. + * Using their Numeric Character Reference's Hexadecimal notation. + */ + $subject = utf8_encode_ucr($subject); + if ($subject && $message) { if (confirm_box(true)) |