From 2abd5e66652e7d647316639e4c1de3f41325e3d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 13 Sep 2005 17:02:43 +0000 Subject: [PATCH] * using htmlspecialchars() for safe XHTML output --- includes/SpecialAncientpages.php | 2 +- includes/SpecialPopularpages.php | 2 +- includes/SpecialShortpages.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/SpecialAncientpages.php b/includes/SpecialAncientpages.php index a9a4231a41..1de0e05386 100644 --- a/includes/SpecialAncientpages.php +++ b/includes/SpecialAncientpages.php @@ -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})"; } } diff --git a/includes/SpecialPopularpages.php b/includes/SpecialPopularpages.php index 930e3e9c3f..7ade3b47ed 100644 --- a/includes/SpecialPopularpages.php +++ b/includes/SpecialPopularpages.php @@ -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})"; } diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index 70ca503d37..fb18a7d5da 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -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})"; } } -- 2.20.1