From 338efdf25fc4469ddc7c019c9facb1978f5923ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 15 Dec 2007 21:24:44 +0000 Subject: [PATCH] * Escape all output * Use semicolon-separator --- includes/SpecialWhatlinkshere.php | 18 +++++++----------- languages/messages/MessagesEn.php | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 881510c9a8..b0ae19c30a 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -60,7 +60,7 @@ class WhatLinksHerePage { $wgOut->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) ); $wgOut->setSubtitle( wfMsg( 'linklistsub' ) ); - $wgOut->addHTML( wfMsg( 'whatlinkshere-barrow' ) . ' ' .$this->skin->makeLinkObj($this->target, '', 'redirect=no' )."
\n"); + $wgOut->addHTML( wfMsgExt( 'whatlinkshere-barrow', array( 'escapenoentities') ) . ' ' .$this->skin->makeLinkObj($this->target, '', 'redirect=no' )."
\n"); $this->showIndirectLinks( 0, $this->target, $this->limit, $this->from, $this->back ); } @@ -194,11 +194,7 @@ class WhatLinksHerePage { if ( $level == 0 ) { $wgOut->addHTML( $this->whatlinkshereForm( $options ) ); $wgOut->addWikiText( wfMsg( 'linkshere', $this->target->getPrefixedText() ) ); - } - $isredir = wfMsg( 'isredirect' ); - $istemplate = wfMsg( 'istemplate' ); - if( $level == 0 ) { $prevnext = $this->getPrevNext( $limit, $prevId, $nextId, $options['namespace'] ); $wgOut->addHTML( $prevnext ); } @@ -219,14 +215,14 @@ class WhatLinksHerePage { // Display properties (redirect or template) $props = array(); if ( $row->page_is_redirect ) { - $props[] = $isredir; + $props[] = wfMsgHtml( 'isredirect' ); } if ( $row->is_template ) { - $props[] = $istemplate; + $props[] = wfMsgHtml( 'istemplate' ); } if ( count( $props ) ) { - // FIXME? Cultural assumption, hard-coded punctuation - $wgOut->addHTML( ' (' . implode( ', ', $props ) . ') ' ); + $list = implode( wfMsgHtml( 'semicolon-separator' ), $props ); + $wgOut->addHTML( " ($list) " ); } # Space for utilities links, with a what-links-here link provided @@ -235,7 +231,7 @@ class WhatLinksHerePage { wfMsgHtml( 'whatlinkshere-links' ), 'target=' . $nt->getPrefixedUrl() ); - $wgOut->addHtml( ' (' . $wlh . ')' ); + $wgOut->addHtml( ' (' . $wlh . ')' ); if ( $row->page_is_redirect ) { if ( $level < 2 ) { @@ -282,7 +278,7 @@ class WhatLinksHerePage { $this->numLink( 250, $prevId ) . ' | ' . $this->numLink( 500, $prevId ); - return wfMsg( 'viewprevnext', $prevLink, $nextLink, $nums ); + return wfMsgHtml( 'viewprevnext', $prevLink, $nextLink, $nums ); } function numLink( $limit, $from, $ns = null ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 67558faeef..cde72f19c9 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2051,7 +2051,7 @@ $1', 'whatlinkshere-title' => 'Pages that link to $1', 'whatlinkshere-summary' => '', # only translate this message to other languages if you have to change it 'whatlinkshere-page' => 'Page:', -'whatlinkshere-barrow' => '<', # only translate this message to other languages if you have to change it +'whatlinkshere-barrow' => '>', # only translate this message to other languages if you have to change it 'linklistsub' => '(List of links)', 'linkshere' => "The following pages link to '''[[:$1]]''':", 'nolinkshere' => "No pages link to '''[[:$1]]'''.", -- 2.20.1