diff options
author | 2020-01-24 04:37:32 +0100 | |
---|---|---|
committer | 2020-01-24 04:38:01 +0100 | |
commit | f7797b89ed605812769e51afc8c529259bbf1b9d (patch) | |
tree | 953468485cbb29469536eb0a34d3f5e5b30611bb | |
parent | [ticket/16337] Fix Emoji in BBcode Helpline (diff) | |
download | phpbb-f7797b89ed605812769e51afc8c529259bbf1b9d.tar.gz phpbb-f7797b89ed605812769e51afc8c529259bbf1b9d.tar.bz2 phpbb-f7797b89ed605812769e51afc8c529259bbf1b9d.zip |
[ticket/16337] Fix Emoji in BBcode Helpline
PHPBB3-16337
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index d5d601a163..a74bf03b1e 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -226,12 +226,18 @@ class acp_bbcodes trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING); } + /** + * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. + * Using their Numeric Character Reference's Hexadecimal notation. + */ + $bbcode_helpline = utf8_encode_ucr($bbcode_helpline); + $sql_ary = array_merge($sql_ary, array( 'bbcode_tag' => $data['bbcode_tag'], 'bbcode_match' => $bbcode_match, 'bbcode_tpl' => $bbcode_tpl, 'display_on_posting' => $display_on_posting, - 'bbcode_helpline' => utf8_encode_ucr($bbcode_helpline), + 'bbcode_helpline' => $bbcode_helpline, 'first_pass_match' => $data['first_pass_match'], 'first_pass_replace' => $data['first_pass_replace'], 'second_pass_match' => $data['second_pass_match'], |