when fixing "naked links" make sure not to double link double urls as seen in archive.org - which has the complete unescaped target url, scheme and all, as part of its own.
This commit is contained in:
@@ -472,7 +472,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
||||
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]';
|
||||
|
||||
if (strpos($Text,'http') !== false) {
|
||||
$Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" >$2</a>', $Text);
|
||||
$Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" >$2</a>', $Text);
|
||||
}
|
||||
|
||||
if (strpos($Text,'[/qr]') !== false) {
|
||||
|
||||
Reference in New Issue
Block a user