X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinker.php;h=48be3bfe7ad914db5fe4107090f967f7837ded5b;hb=818e93ed2b822cd9cbae25046d6e4ab55d999aee;hp=a0332cf615cb9716f02b2f05f034a5488b6c4f89;hpb=8f167abd1219d1e657fedb87939ee7866fed6fc2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index a0332cf615..48be3bfe7a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1192,12 +1192,12 @@ class Linker { $section = str_replace( '[[', '', $section ); $section = str_replace( ']]', '', $section ); - $section = Sanitizer::normalizeSectionNameWhitespace( $section ); # T24784 + $section = substr( Parser::guessSectionNameFromStrippedText( $section ), 1 ); if ( $local ) { - $sectionTitle = Title::newFromText( '#' . $section ); + $sectionTitle = Title::makeTitleSafe( NS_MAIN, '', $section ); } else { $sectionTitle = Title::makeTitleSafe( $title->getNamespace(), - $title->getDBkey(), Sanitizer::decodeCharReferences( $section ) ); + $title->getDBkey(), $section ); } if ( $sectionTitle ) { $link = Linker::makeCommentLink( $sectionTitle, $wgLang->getArrow(), $wikiId, 'noclasses' );