aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKYPREO <58344533+KYPREO@users.noreply.github.com>2020-01-22 20:24:47 +1100
committerKYPREO <58344533+KYPREO@users.noreply.github.com>2020-01-22 20:24:47 +1100
commit1f22248965e5bd0b5a45a7024d23b6f9fac5df08 (patch)
tree25262b6b24c97127b01ba9c57c024a51ec95f74a
parent[ticket/16329] Add configuration options for Plupload (diff)
parentMerge pull request #5814 from 3D-I/ticket/15079 (diff)
downloadphpbb-1f22248965e5bd0b5a45a7024d23b6f9fac5df08.tar.gz
phpbb-1f22248965e5bd0b5a45a7024d23b6f9fac5df08.tar.bz2
phpbb-1f22248965e5bd0b5a45a7024d23b6f9fac5df08.zip
Merge branch '3.2.x' into ticket/16329
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php12
-rw-r--r--phpBB/posting.php6
2 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 87a8c91fd2..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))
@@ -870,6 +876,12 @@ function compose_pm($id, $mode, $action, $user_folders = array())
'address_list' => $address_list
);
+ /**
+ * 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);
+
// ((!$message_subject) ? $subject : $message_subject)
$msg_id = submit_pm($action, $subject, $pm_data);
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))