jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392991 )
Change subject: Linker: Use Parser::guessSectionNameFromStrippedText() ...................................................................... Linker: Use Parser::guessSectionNameFromStrippedText() Instead of weird partial stuff. Change-Id: Ibe7435a4723d2741e32d37d2ba67396d78d14044 --- M includes/Linker.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Linker.php b/includes/Linker.php index 403b10a..17bcc91 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1170,12 +1170,12 @@ $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' ); -- To view, visit https://gerrit.wikimedia.org/r/392991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe7435a4723d2741e32d37d2ba67396d78d14044 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Catrope <r...@wikimedia.org> Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: Tim Starling <tstarl...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits