From: Erik Moeller Date: Sun, 7 Nov 2004 10:14:36 +0000 (+0000) Subject: [[Wikinews:Bla]] should not be matched as a news:// URL type. X-Git-Tag: 1.5.0alpha1~1389 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=1c54b48e4a3d278ef1391fcc5a629d0ebe30b21a;p=lhc%2Fweb%2Fwiklou.git [[Wikinews:Bla]] should not be matched as a news:// URL type. Change regex to require that URL_PROTOCOLS is at the beginning of a link (e.g. [[news:bla]]) for it to match. Note: This will break if someone decides to reverse the order of replaceExternal and replaceInternal again. --- diff --git a/includes/Parser.php b/includes/Parser.php index 2ec45cb160..5f115a8a48 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1188,7 +1188,7 @@ class Parser # Don't allow internal links to pages containing # PROTO: where PROTO is a valid URL protocol; these # should be external links. - if (preg_match('/((?:'.URL_PROTOCOLS.'):)/', $m[1])) { + if (preg_match('/^((?:'.URL_PROTOCOLS.'):)/', $m[1])) { $s .= $prefix . '[[' . $line ; continue; }