From: Rob Church Date: Mon, 18 Dec 2006 17:23:25 +0000 (+0000) Subject: * (bug 2785) Accept optional colon prefix in links when formatting comments X-Git-Tag: 1.31.0-rc.0~54853 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=88c57dd967e420d49199c1986e72502a7dcf18b0;p=lhc%2Fweb%2Fwiklou.git * (bug 2785) Accept optional colon prefix in links when formatting comments --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6d1d114aec..f24d47c97e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -341,6 +341,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8110) Make magic ISBN linking stricter: only match ten-digit sequences (plus optional ISBN-13 prefix) with no immediately following alphanumeric character, disallow multiple consecutive internal redirects +* (bug 2785) Accept optional colon prefix in links when formatting comments == Languages updated == diff --git a/includes/Linker.php b/includes/Linker.php index b3a24e1bdb..ad2f098bf2 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -912,7 +912,7 @@ class Linker { # is ignored $medians = '(?:' . preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/' ) . '|'; $medians .= preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/' ) . '):'; - while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) { + while(preg_match('/\[\[:?(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) { # Handle link renaming [[foo|text]] will show link as "text" if( "" != $match[3] ) { $text = $match[3];