Merge branch '3.2.x' into ticket/16329

This commit is contained in:
KYPREO 2020-01-22 20:24:47 +11:00
commit 1f22248965
2 changed files with 18 additions and 0 deletions

View file

@ -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);

View file

@ -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))