X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FCoreParserFunctions.php;h=07944d464896468eafd8f4d3a9d3b1e12d0639a0;hb=ddfb4817b59ec10fa928c4059066f2ef39110ad5;hp=bb0072c037b59b760170115721828f560a113b1e;hpb=0ac22175449da10dfbd6f1de14f62eb20266151d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index bb0072c037..07944d4648 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -930,7 +930,8 @@ class CoreParserFunctions { */ public static function anchorencode( $parser, $text ) { $text = $parser->killMarkers( $text ); - return (string)substr( $parser->guessSectionNameFromWikiText( $text ), 1 ); + $section = (string)substr( $parser->guessSectionNameFromWikiText( $text ), 1 ); + return Sanitizer::safeEncodeAttribute( $section ); } public static function special( $parser, $text ) {