r93650 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93649‎ | r93650 | r93651 >
Date:20:42, 1 August 2011
Author:hartman
Status:ok
Tags:
Comment:
Wow, apparently WebRequest has it's own versions of these appendQuery().
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -109,9 +109,7 @@
110110 public function addMobileFooter( &$obj, &$tpl ) {
111111 global $wgRequest;
112112 $footerlinks = $tpl->data['footerlinks'];
113 - $mobileViewUrl = $wgRequest->getRequestURL();
114 - $mobileViewUrl = wfAppendQuery( $mobileViewUrl, 'useFormat=mobile' );
115 - $mobileViewUrl = htmlspecialchars( $mobileViewUrl );
 113+ $mobileViewUrl = $wgRequest->escapeAppendQuery( 'useFormat=mobile' );
116114
117115 $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>".wfMsg( 'mobile-frontend-view')."</a>");
118116 $footerlinks['places'][] = 'mobileview';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93561htmlspecialchars() on urls outputted to pagesreedy00:00, 31 July 2011
r93591Use wfAppendQuery instead of reimplementation.hartman15:16, 31 July 2011

Status & tagging log