aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2020-01-03 00:05:14 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2020-01-03 00:06:15 +0100
commitf0ebd6da0f85bda3e468a2dbdf4e69fe8c5f950d (patch)
treedef7dde4290444254170b22ffff25c31823222a0
parent[ticket/15712] Add Emoji and rich text in PM subject (diff)
downloadphpbb-f0ebd6da0f85bda3e468a2dbdf4e69fe8c5f950d.tar.gz
phpbb-f0ebd6da0f85bda3e468a2dbdf4e69fe8c5f950d.tar.bz2
phpbb-f0ebd6da0f85bda3e468a2dbdf4e69fe8c5f950d.zip
[ticket/15712] Add Emoji and rich text in PM Draft subject
Extends to Drafts PHPBB3-15712
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 0a40a74b9f..2e1ad3fdcf 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -665,6 +665,12 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $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))