Added new success message when CLI Installer completes its work succesfuly.
[lhc/web/wiklou.git] / includes / Linker.php
index a55067d..403b10a 100644 (file)
@@ -1175,7 +1175,7 @@ class Linker {
                                                        $sectionTitle = Title::newFromText( '#' . $section );
                                                } else {
                                                        $sectionTitle = Title::makeTitleSafe( $title->getNamespace(),
-                                                               $title->getDBkey(), $section );
+                                                               $title->getDBkey(), Sanitizer::decodeCharReferences( $section ) );
                                                }
                                                if ( $sectionTitle ) {
                                                        $link = Linker::makeCommentLink( $sectionTitle, $wgLang->getArrow(), $wikiId, 'noclasses' );
@@ -1537,10 +1537,16 @@ class Linker {
                if ( $sectionIndex !== false ) {
                        $classes .= " tocsection-$sectionIndex";
                }
-               return "\n<li class=\"$classes\"><a href=\"#" .
-                       $anchor . '"><span class="tocnumber">' .
-                       $tocnumber . '</span> <span class="toctext">' .
-                       $tocline . '</span></a>';
+
+               // \n<li class="$classes"><a href="#$anchor"><span class="tocnumber">
+               // $tocnumber</span> <span class="toctext">$tocline</span></a>
+               return "\n" . Html::openElement( 'li', [ 'class' => $classes ] )
+                       . Html::rawElement( 'a',
+                               [ 'href' => "#$anchor" ],
+                               Html::element( 'span', [ 'class' => 'tocnumber' ], $tocnumber )
+                                       . ' '
+                                       . Html::rawElement( 'span', [ 'class' => 'toctext' ], $tocline )
+                       );
        }
 
        /**