From: Ævar Arnfjörð Bjarmason Date: Sat, 7 Jan 2006 09:13:38 +0000 (+0000) Subject: * Replacing custom escaping code with a call to Sanitizer::escapeId() X-Git-Tag: 1.6.0~728 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=62f6123443c146a60c737b36f1c8d5b1480a144f;p=lhc%2Fweb%2Fwiklou.git * Replacing custom escaping code with a call to Sanitizer::escapeId() --- diff --git a/includes/Parser.php b/includes/Parser.php index 3050e7797a..629d3caaf7 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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;