From 7604067090aaa2490d0b57c66861373d5c6d7e70 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 1 Dec 2004 16:45:26 +0000 Subject: [PATCH] XHTML fixes --- includes/ImageGallery.php | 9 ++++++--- includes/SpecialNewimages.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 7a8c6e01aa..8184ce4987 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -97,20 +97,23 @@ class ImageGallery wfMsg( "nbytes", $wgLang->formatNum( $img->getSize() ) ) . '
' : '' ; $textlink = $this->mShowFilename ? - $sk->makeKnownLinkObj( $nt, Language::truncate( $nt->getText(), 20, '...' ) ) . '
' : + $sk->makeKnownLinkObj( $nt, htmlspecialchars( $wgLang->truncate( $nt->getText(), 20, '...' ) ) ) . '
' : '' ; $s .= ($i%4==0) ? '' : ''; $s .= '' . ''. '
' . - $sk->makeKnownLinkObj( $nt, '' ) . '
' . + $sk->makeKnownLinkObj( $nt, '' ) . ' ' . $textlink . $text . $nb; - $s .= '' . (($i%4==3) ? '' : ''); + $s .= "\n" . (($i%4==3) ? "\n" : ''); $i++; } + if( $i %4 != 0 ) { + $s .= "\n"; + } $s .= ''; return $s; diff --git a/includes/SpecialNewimages.php b/includes/SpecialNewimages.php index c42f4deb10..9d0d51b461 100644 --- a/includes/SpecialNewimages.php +++ b/includes/SpecialNewimages.php @@ -72,7 +72,7 @@ function wfSpecialNewimages() { "sort=bydate&limit={$num}&wpIlMatch=" . urlencode( $wpIlMatch ) ); } $text = wfMsg( 'showlast', $fill, $bydate ); - $wgOut->addHTML( $text."

\n" ); + $wgOut->addHTML( $text."\n" ); $i=0; $res = $dbr->query( $sql, 'wfSpecialImagelist' ); -- 2.20.1