aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-05-20 09:03:59 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-05-20 09:03:59 +0200
commit0e5d1decbf64eb1192c0ad697c38f368e8f970e7 (patch)
treeff6c2b85566affe293828bfdf58eb6460644025b
parent91cace06a5b8d0d2b2446429ec404acda0f42e5b (diff)
downloadforums-0e5d1decbf64eb1192c0ad697c38f368e8f970e7.tar
forums-0e5d1decbf64eb1192c0ad697c38f368e8f970e7.tar.gz
forums-0e5d1decbf64eb1192c0ad697c38f368e8f970e7.tar.bz2
forums-0e5d1decbf64eb1192c0ad697c38f368e8f970e7.tar.xz
forums-0e5d1decbf64eb1192c0ad697c38f368e8f970e7.zip
[ticket/13832] Use preg_replace_callback in check_flash_bbcodes
PHPBB3-13832
-rw-r--r--phpBB/develop/check_flash_bbcodes.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/develop/check_flash_bbcodes.php b/phpBB/develop/check_flash_bbcodes.php
index 6e1b415bb6..2a54724aaa 100644
--- a/phpBB/develop/check_flash_bbcodes.php
+++ b/phpBB/develop/check_flash_bbcodes.php
@@ -140,8 +140,13 @@ function html_entity_decode_utf8($string)
static $trans_tbl;
// replace numeric entities
- $string = preg_replace('~&#x([0-9a-f]+);~ei', 'code2utf8(hexdec("\\1"))', $string);
+ $string = preg_replace_callback('~&#x([0-9a-f]+);~i', function ($match) {
+ return code2utf8(hexdec($match[1]));
+ }, $string);
$string = preg_replace('~&#([0-9]+);~e', 'code2utf8(\\1)', $string);
+ $string = preg_replace_callback('~&#([0-9]+);~', function ($match) {
+ return code2utf8($match[1]);
+ }, $string);
// replace literal entities
if (!isset($trans_tbl))