(bug 8914) Don't transform colons in {{anchorencode:}}
authorRob Church <robchurch@users.mediawiki.org>
Thu, 29 Mar 2007 18:57:54 +0000 (18:57 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 29 Mar 2007 18:57:54 +0000 (18:57 +0000)
RELEASE-NOTES
includes/CoreParserFunctions.php

index 7e692c7..37bcb58 100644 (file)
@@ -289,9 +289,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 4756) Add user tool links for self created accounts at special:log
   instead of sometimes broken block links from newuserlog extension
 * (bug 5817) Special:Recentchangeslinked now shows red link for nonexistent
-  target page instead of silently redirecting.
-
-
+  target page instead of silently redirecting
+* (bug 8914) Don't transform colons in {{anchorencode:}}
 == Maintenance ==
 * New script maintenance/language/checkExtensioni18n.php used to check i18n
   progress in the extension repository.
index 1b08e82..0c4d0a0 100644 (file)
@@ -169,7 +169,11 @@ class CoreParserFunctions {
        }
 
        static function anchorencode( $parser, $text ) {
-               return strtr( urlencode( $text ) , array( '%' => '.' , '+' => '_' ) );
+               $a = urlencode( $text );
+               $a = strtr( $a, array( '%' => '.', '+' => '_' ) );
+               # leave colons alone, however
+               $a = str_replace( '.3A', ':', $a );
+               return $a;
        }
 
        static function special( $parser, $text ) {