aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2014-11-06 12:25:36 +0700
committerrxu <rxu@mail.ru>2014-11-09 20:59:14 +0700
commit483af1d036aadf8bd7d3b4c76a1fe97409238547 (patch)
tree6d95f41dde2756c48c2844c4689d8e5e03196f68 /phpBB/includes/message_parser.php
parenta1b58d05d158ff7afd789c1b27821e17198f8d58 (diff)
downloadforums-483af1d036aadf8bd7d3b4c76a1fe97409238547.tar
forums-483af1d036aadf8bd7d3b4c76a1fe97409238547.tar.gz
forums-483af1d036aadf8bd7d3b4c76a1fe97409238547.tar.bz2
forums-483af1d036aadf8bd7d3b4c76a1fe97409238547.tar.xz
forums-483af1d036aadf8bd7d3b4c76a1fe97409238547.zip
[ticket/13297] Add unicode modifier to url/email regular expression patterns.
PHPBB3-13297
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 92ace7b585..b2b73bf3de 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -313,7 +313,7 @@ class bbcode_firstpass extends bbcode
$in = str_replace(' ', '%20', $in);
// Checking urls
- if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) && !preg_match('#^' . get_preg_expression('www_url') . '$#i', $in))
+ if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) && !preg_match('#^' . get_preg_expression('www_url') . '$#iu', $in))
{
return '[img]' . $in . '[/img]';
}
@@ -381,8 +381,8 @@ class bbcode_firstpass extends bbcode
$in = str_replace(' ', '%20', $in);
// Make sure $in is a URL.
- if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) &&
- !preg_match('#^' . get_preg_expression('www_url') . '$#i', $in))
+ if (!preg_match('#^' . get_preg_expression('url') . '$#iu', $in) &&
+ !preg_match('#^' . get_preg_expression('www_url') . '$#iu', $in))
{
return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
}
@@ -973,9 +973,9 @@ class bbcode_firstpass extends bbcode
$url = str_replace(' ', '%20', $url);
// Checking urls
- if (preg_match('#^' . get_preg_expression('url') . '$#i', $url) ||
- preg_match('#^' . get_preg_expression('www_url') . '$#i', $url) ||
- preg_match('#^' . preg_quote(generate_board_url(), '#') . get_preg_expression('relative_url') . '$#i', $url))
+ if (preg_match('#^' . get_preg_expression('url') . '$#iu', $url) ||
+ preg_match('#^' . get_preg_expression('www_url') . '$#iu', $url) ||
+ preg_match('#^' . preg_quote(generate_board_url(), '#') . get_preg_expression('relative_url') . '$#iu', $url))
{
$valid = true;
}