mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
Merge branch 'develop-ascraeus' into develop
This commit is contained in:
@@ -712,7 +712,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
|
||||
break;
|
||||
}
|
||||
|
||||
$short_url = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url;
|
||||
$short_url = (utf8_strlen($url) > 55) ? utf8_substr($url, 0, 39) . ' ... ' . utf8_substr($url, -10) : $url;
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
@@ -788,28 +788,28 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
|
||||
|
||||
// relative urls for this board
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#i',
|
||||
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#iu',
|
||||
MAGIC_URL_LOCAL,
|
||||
$local_class,
|
||||
);
|
||||
|
||||
// matches a xxxx://aaaaa.bbb.cccc. ...
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#i',
|
||||
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#iu',
|
||||
MAGIC_URL_FULL,
|
||||
$class,
|
||||
);
|
||||
|
||||
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#i',
|
||||
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#iu',
|
||||
MAGIC_URL_WWW,
|
||||
$class,
|
||||
);
|
||||
|
||||
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/i',
|
||||
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/iu',
|
||||
MAGIC_URL_EMAIL,
|
||||
'',
|
||||
);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user