dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove useless StatusTest::testCanConstruct()"
[lhc/web/wiklou.git]
/
includes
/
Linker.php
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
a0332cf
..
84e3103
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-1192,12
+1192,12
@@
class Linker {
$section = str_replace( '[[', '', $section );
$section = str_replace( ']]', '', $section );
$section = str_replace( '[[', '', $section );
$section = str_replace( ']]', '', $section );
- $section =
Sanitizer::normalizeSectionNameWhitespace( $section ); # T24784
+ $section =
substr( Parser::guessSectionNameFromStrippedText( $section ), 1 );
if ( $local ) {
if ( $local ) {
- $sectionTitle = Title::
newFromText( '#' .
$section );
+ $sectionTitle = Title::
makeTitleSafe( NS_MAIN, '',
$section );
} else {
$sectionTitle = Title::makeTitleSafe( $title->getNamespace(),
} else {
$sectionTitle = Title::makeTitleSafe( $title->getNamespace(),
- $title->getDBkey(),
Sanitizer::decodeCharReferences( $section )
);
+ $title->getDBkey(),
$section
);
}
if ( $sectionTitle ) {
$link = Linker::makeCommentLink( $sectionTitle, $wgLang->getArrow(), $wikiId, 'noclasses' );
}
if ( $sectionTitle ) {
$link = Linker::makeCommentLink( $sectionTitle, $wgLang->getArrow(), $wikiId, 'noclasses' );
@@
-1595,7
+1595,12
@@
class Linker {
$title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
return '<div id="toc" class="toc">'
$title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
return '<div id="toc" class="toc">'
- . '<div class="toctitle"><h2>' . $title . "</h2></div>\n"
+ . Html::openElement( 'div', [
+ 'class' => 'toctitle',
+ 'lang' => $lang->getHtmlCode(),
+ 'dir' => $lang->getDir(),
+ ] )
+ . '<h2>' . $title . "</h2></div>\n"
. $toc
. "</ul>\n</div>\n";
}
. $toc
. "</ul>\n</div>\n";
}