aboutsummaryrefslogtreecommitdiff
path: root/phpBB
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2020-01-24 04:37:32 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2020-01-24 04:38:01 +0100
commitf7797b89ed605812769e51afc8c529259bbf1b9d (patch)
tree953468485cbb29469536eb0a34d3f5e5b30611bb /phpBB
parent[ticket/16337] Fix Emoji in BBcode Helpline (diff)
downloadphpbb-f7797b89ed605812769e51afc8c529259bbf1b9d.tar.gz
phpbb-f7797b89ed605812769e51afc8c529259bbf1b9d.tar.bz2
phpbb-f7797b89ed605812769e51afc8c529259bbf1b9d.zip
[ticket/16337] Fix Emoji in BBcode Helpline
PHPBB3-16337
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php8
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'],