* using htmlspecialchars() for safe XHTML output
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 13 Sep 2005 17:02:43 +0000 (17:02 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 13 Sep 2005 17:02:43 +0000 (17:02 +0000)
includes/SpecialAncientpages.php
includes/SpecialPopularpages.php
includes/SpecialShortpages.php

index a9a4231..1de0e05 100644 (file)
@@ -51,7 +51,7 @@ class AncientPagesPage extends QueryPage {
 
                $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
                $title = Title::makeTitle( $result->namespace, $result->title );
-               $link = $skin->makeKnownLinkObj( $title, $wgContLang->convert( $title->getPrefixedText() ) );
+               $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
                return "{$link} ({$d})";
        }
 }
index 930e3e9..7ade3b4 100644 (file)
@@ -43,7 +43,7 @@ class PopularPagesPage extends QueryPage {
        function formatResult( $skin, $result ) {
                global $wgLang, $wgContLang;
                $title = Title::makeTitle( $result->namespace, $result->title );
-               $link = $skin->makeKnownLinkObj( $title, $wgContLang->convert( $title->getPrefixedText() ) );
+               $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
                $nv = wfMsg( "nviews", $wgLang->formatNum( $result->value ) );
                return "{$link} ({$nv})";
        }
index 70ca503..fb18a7d 100644 (file)
@@ -55,7 +55,7 @@ class ShortPagesPage extends QueryPage {
                global $wgLang, $wgContLang;
                $nb = htmlspecialchars( wfMsg( "nbytes", $wgLang->formatNum( $result->value ) ) );
                $title = Title::makeTitle( $result->namespace, $result->title );
-               $link = $skin->makeKnownLinkObj( $title, $wgContLang->convert( $title->getPrefixedText() ) );
+               $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
                return "{$link} ({$nb})";
        }
 }