From: Rob Church Date: Thu, 29 Mar 2007 18:57:54 +0000 (+0000) Subject: (bug 8914) Don't transform colons in {{anchorencode:}} X-Git-Tag: 1.31.0-rc.0~53538 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=e6df1dee1d19a8efd6ca4611c5a1f4972b9d8058;p=lhc%2Fweb%2Fwiklou.git (bug 8914) Don't transform colons in {{anchorencode:}} --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7e692c706d..37bcb583c7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/includes/CoreParserFunctions.php b/includes/CoreParserFunctions.php index 1b08e82bcb..0c4d0a0c81 100644 --- a/includes/CoreParserFunctions.php +++ b/includes/CoreParserFunctions.php @@ -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 ) {