aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_bbcodes.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2015-01-11 20:36:22 +0700
committerrxu <rxu@mail.ru>2015-01-11 20:36:22 +0700
commit17f4dce0fc2bb1105a3181ccd7a4119f40191c2b (patch)
treef611cb1557c51a3b5dbd0845a2db0fff69160ab2 /phpBB/includes/acp/acp_bbcodes.php
parente8464d7fe235bf2c5ac428fc38a7fada4bcfb1bb (diff)
downloadforums-17f4dce0fc2bb1105a3181ccd7a4119f40191c2b.tar
forums-17f4dce0fc2bb1105a3181ccd7a4119f40191c2b.tar.gz
forums-17f4dce0fc2bb1105a3181ccd7a4119f40191c2b.tar.bz2
forums-17f4dce0fc2bb1105a3181ccd7a4119f40191c2b.tar.xz
forums-17f4dce0fc2bb1105a3181ccd7a4119f40191c2b.zip
[ticket/13492] Add IDN support for custom BBCode URL tokens
Custom BBCode URL tokens does not support IDN. Custom BBCodes added earlier than IDN has been applied are unaffected. PHPBB3-13492
Diffstat (limited to 'phpBB/includes/acp/acp_bbcodes.php')
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index 130a3ef542..2686be64e0 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -409,7 +409,9 @@ class acp_bbcodes
{
$bbcode_match = trim($bbcode_match);
$bbcode_tpl = trim($bbcode_tpl);
- $utf8 = strpos($bbcode_match, 'INTTEXT') !== false;
+
+ // Allow unicode characters for URL|LOCAL_URL|RELATIVE_URL|INTTEXT tokens
+ $utf8 = preg_match('/\{(URL|LOCAL_URL|RELATIVE_URL|INTTEXT)\}/', $bbcode_match);
$utf8_pcre_properties = phpbb_pcre_utf8_support();