$section = str_replace( '[[', '', $section );
$section = str_replace( ']]', '', $section );
+ // We don't want any links in the auto text to be linked, but we still
+ // want to show any [[ ]]
+ $sectionText = str_replace( '[[', '[[', $auto );
+
$section = substr( Parser::guessSectionNameFromStrippedText( $section ), 1 );
if ( $local ) {
$sectionTitle = Title::makeTitleSafe( NS_MAIN, '', $section );
}
if ( $sectionTitle ) {
$auto = Linker::makeCommentLink(
- $sectionTitle, $wgLang->getArrow() . $wgLang->getDirMark() . $auto,
+ $sectionTitle, $wgLang->getArrow() . $wgLang->getDirMark() . $sectionText,
$wikiId, 'noclasses'
);
}