From ed5ebf474f21190f8c0f8ec1cce561ae1b403fd1 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 16 Mar 2004 15:57:42 +0000 Subject: [PATCH] Fix source forge bug 694639 Thanks to gwicke on irc for teaching me how to stop + or * to be greedy (ie replace by +? and *?). Space around column are striped from link but the link title still show the spaces. --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Title.php b/includes/Title.php index 0048fe40c6..c8373ce4d7 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -591,7 +591,7 @@ class Title { $r = substr( $t, 1 ); } else { # Namespace or interwiki prefix - if ( preg_match( "/^((?:i|x|[a-z]{2,3})(?:-[a-z0-9]+)?|[A-Za-z0-9_\\x80-\\xff]+):_*(.*)$/", $t, $m ) ) { + if ( preg_match( "/^((?:i|x|[a-z]{2,3})(?:-[a-z0-9]+)?|[A-Za-z0-9_\\x80-\\xff]+?)_*:_*(.*)$/", $t, $m ) ) { #$p = strtolower( $m[1] ); $p = $m[1]; if ( $ns = $wgLang->getNsIndex( strtolower( $p ) )) { -- 2.20.1