From: Marcel Werk Date: Sat, 11 Jan 2014 21:28:09 +0000 (+0100) Subject: Fixed URL parsing issue X-Git-Tag: 2.0.2~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0c1297911c094cc56d59aa1179f4f98d99a01f9;p=GitHub%2FWoltLab%2FWCF.git Fixed URL parsing issue --- diff --git a/wcfsetup/install/files/lib/system/bbcode/SimpleMessageParser.class.php b/wcfsetup/install/files/lib/system/bbcode/SimpleMessageParser.class.php index 9afaba670c..4cde4ebef8 100644 --- a/wcfsetup/install/files/lib/system/bbcode/SimpleMessageParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/SimpleMessageParser.class.php @@ -150,7 +150,14 @@ class SimpleMessageParser extends SingletonFactory { * @see \wcf\system\bbcode\SimpleMessageParser::parseURLs() */ protected function parseURLsCallback($matches) { - return StringUtil::getAnchorTag(StringUtil::decodeHTML($matches[0])); + $url = StringUtil::decodeHTML($matches[0]); + + // add protocol if necessary + if (!preg_match("/[a-z]:\/\//si", $url)) { + $url = 'http://'.$url; + } + + return StringUtil::getAnchorTag($url); } /**