aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2020-01-25 15:35:38 +0100
committerMarc Alexander <admin@m-a-styles.de>2020-01-25 15:35:38 +0100
commit28ecd3a8c05a0ad4fd369c4c87c1dabf44ba5b9e (patch)
treebf036e9dd619c943ea2e9671865cdb387df31659
parentMerge branch '3.3.x' (diff)
parentMerge branch '3.2.x' into 3.3.x (diff)
downloadphpbb-28ecd3a8c05a0ad4fd369c4c87c1dabf44ba5b9e.tar.gz
phpbb-28ecd3a8c05a0ad4fd369c4c87c1dabf44ba5b9e.tar.bz2
phpbb-28ecd3a8c05a0ad4fd369c4c87c1dabf44ba5b9e.zip
Merge branch '3.3.x'
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php6
-rw-r--r--phpBB/includes/functions_display.php3
2 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index 5e39055f50..28bb18037f 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -240,6 +240,12 @@ 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,
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 44478dbe49..f3f57b22f8 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1116,6 +1116,9 @@ function display_custom_bbcodes()
$row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])];
}
+ // Convert Numeric Character References to UTF-8 chars.
+ $row['bbcode_helpline'] = utf8_decode_ncr($row['bbcode_helpline']);
+
$custom_tags = array(
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),