Bugfix: https url replacement

Исправление ошибки с некорректной заменой https-ссылок.
This commit is contained in:
Exile 2014-09-07 16:55:33 +04:00
commit 44dd6f69d0
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Version info
$bb_cfg['tp_version'] = '2.1 (STABLE)';
$bb_cfg['tp_release_date'] = '01-09-2014';
$bb_cfg['tp_release_date'] = '07-09-2014';
$bb_cfg['tp_release_state'] = 'R600';
// Database

View file

@ -704,7 +704,7 @@ class bbcode
$url = trim($m[1]);
$url_name = (isset($m[2])) ? trim($m[2]) : $url;
if (!preg_match("#^http://#", $url) && !preg_match("/^#/", $url)) $url = 'http://' . $url;
if (!preg_match("#^https?://#isu", $url) && !preg_match("/^#/", $url)) $url = 'http://' . $url;
if (in_array(parse_url($url, PHP_URL_HOST), $bb_cfg['nofollow']['allowed_url']) || $bb_cfg['nofollow']['disabled'])
{