* Replacing custom escaping code with a call to Sanitizer::escapeId()
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 7 Jan 2006 09:13:38 +0000 (09:13 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 7 Jan 2006 09:13:38 +0000 (09:13 +0000)
includes/Parser.php

index 3050e77..629d3ca 100644 (file)
@@ -2897,11 +2897,7 @@ class Parser
                        # strip out HTML
                        $canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
                        $tocline = trim( $canonized_headline );
-                       $canonized_headline = urlencode( Sanitizer::decodeCharReferences( str_replace(' ', '_', $tocline) ) );
-                       $replacearray = array(
-                               '%3A' => ':',
-                               '%' => '.'
-                       );
+                       $canonized_headline = Sanitizer::escapeId( $tocline );
                        $canonized_headline = str_replace(array_keys($replacearray),array_values($replacearray),$canonized_headline);
                        $refers[$headlineCount] = $canonized_headline;