Merge "SpecialWatchlist: Minor cleanup"
[lhc/web/wiklou.git] / includes / specials / SpecialAllpages.php
index 8c93520..a082049 100644 (file)
@@ -159,6 +159,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                $out .= Xml::closeElement( 'fieldset' );
                $out .= Xml::closeElement( 'form' );
                $out .= Xml::closeElement( 'div' );
+
                return $out;
        }
 
@@ -258,6 +259,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                        } else {
                                $output->addHTML( $this->namespaceForm( $namespace, $from, $to, $hideredirects ) );
                        }
+
                        return;
                }
 
@@ -306,8 +308,10 @@ class SpecialAllpages extends IncludableSpecialPage {
        function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) {
                // Use content language since page titles are considered to use content language
                global $wgContLang;
-               $inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) );
-               $outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint ) );
+
+               $inpointf = str_replace( '_', ' ', $inpoint );
+               $outpointf = str_replace( '_', ' ', $outpoint );
+
                // Don't let the length runaway
                $inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength );
                $outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength );
@@ -317,20 +321,22 @@ class SpecialAllpages extends IncludableSpecialPage {
                        'to' => $outpoint,
                );
 
-               if( $namespace ) {
+               if ( $namespace ) {
                        $queryParams['namespace'] = $namespace;
                }
                if ( $hideRedirects ) {
                        $queryParams['hideredirects'] = 1;
                }
 
-               $link = htmlspecialchars(
-                       $this->getTitle()->getLocalURL( $queryParams ) );
+               $url = $this->getTitle()->getLocalURL( $queryParams );
+               $inlink = Html::element( 'a', array( 'href' => $url ), $inpointf );
+               $outlink = Html::element( 'a', array( 'href' => $url ), $outpointf );
 
                $out = $this->msg( 'alphaindexline' )->rawParams(
-                       "<a href=\"$link\">$inpointf</a></td><td>",
-                       "</td><td><a href=\"$link\">$outpointf</a>"
+                       "$inlink</td><td>",
+                       "</td><td>$outlink"
                )->escaped();
+
                return '<tr><td class="mw-allpages-alphaindexline">' . $out . '</td></tr>';
        }
 
@@ -531,7 +537,6 @@ class SpecialAllpages extends IncludableSpecialPage {
                                        )
                        );
                }
-
        }
 
        /**