1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-20 07:42:09 +02:00

[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
This commit is contained in:
rxu 2015-01-11 20:36:22 +07:00
parent e8464d7fe2
commit 17f4dce0fc

View File

@ -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();