From 1c54b48e4a3d278ef1391fcc5a629d0ebe30b21a Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Sun, 7 Nov 2004 10:14:36 +0000 Subject: [PATCH] [[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. --- includes/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.20.1