https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113444
Revision: 113444 Author: awjrichards Date: 2012-03-09 01:32:54 +0000 (Fri, 09 Mar 2012) Log Message: ----------- Followup r113442, using internal message array and escaping button messages Modified Paths: -------------- trunk/extensions/MobileFrontend/MobileFrontend.body.php trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.body.php =================================================================== --- trunk/extensions/MobileFrontend/MobileFrontend.body.php 2012-03-09 01:24:43 UTC (rev 113443) +++ trunk/extensions/MobileFrontend/MobileFrontend.body.php 2012-03-09 01:32:54 UTC (rev 113444) @@ -1218,8 +1218,8 @@ 'wgScriptPath' => $wgScriptPath, 'isFilePage' => self::$isFilePage, 'zeroRatedBanner' => self::$zeroRatedBanner, - 'showText' => wfMessage( 'mobile-frontend-show-button' ), - 'hideText' => wfMessage( 'mobile-frontend-hide-button' ), + 'showText' => self::$messages[ 'mobile-frontend-show-button' ], + 'hideText' => self::$messages[ 'mobile-frontend-hide-button' ], ); $applicationTemplate->setByArray( $options ); wfProfileOut( __METHOD__ ); Modified: trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php =================================================================== --- trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php 2012-03-09 01:24:43 UTC (rev 113443) +++ trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php 2012-03-09 01:32:54 UTC (rev 113444) @@ -40,7 +40,10 @@ $startLinkTag = "<link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/"; $endLinkTag = "' media='all' rel='Stylesheet' type='text/css' />"; $filePageStyle = ( $this->data['isFilePage'] ) ? $startLinkTag . 'filepage.css' . $endLinkTag : ''; + $buttonHideText = htmlentities( $this->data['hideText'], ENT_QUOTES ); + $buttonShowText = htmlentities( $this->data['showText'], ENT_QUOTES ); + $applicationHtml = <<<HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -59,8 +62,8 @@ var title = "{$this->data['htmlTitle']}"; var scriptPath = "{$this->data['wgScriptPath']}"; var placeholder = "{$this->data['placeholder']}"; - var showText = "{$this->data['showText']}"; - var hideText = "{$this->data['hideText']}"; + var showText = "{$buttonShowText}"; + var hideText = "{$buttonHideText}"; //]]> </script> </head> _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs