From: Brion Vibber Date: Mon, 30 Apr 2007 17:41:12 +0000 (+0000) Subject: Normalize escaping for some image page messages: X-Git-Tag: 1.31.0-rc.0~53167 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/Special:FilePath/csstidy/_class_csstidy_print_php.html?a=commitdiff_plain;h=f83d881fb16025437543141f5ef396c0ea3e7e19;p=lhc%2Fweb%2Fwiklou.git Normalize escaping for some image page messages: * HTML-escape the image filename when made into an original-size link for HTML purity * Use inline wiki parsing instead of raw HTML for show-big-image-thumb and file-nohires messages. This is cleaner (less raw HTML yay) while avoiding breaking the "" tags which are for some reason in the defaults and likely any customizations (sigh) and will allow the pixel values to have localized number formatting if appropriate parser function is used --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 84863d8b6e..e593082ecc 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -224,12 +224,13 @@ class ImagePage extends Article { # Note that $height <= $maxHeight now, but might not be identical # because of rounding. } - $msgbig = wfMsgHtml('show-big-image'); - $msgsmall = wfMsg('show-big-image-thumb', $width, $height ); + $msgbig = wfMsgHtml( 'show-big-image' ); + $msgsmall = wfMsgExt( 'show-big-image-thumb', + array( 'parseinline' ), $width, $height ); } else { # Image is small enough to show full size on image page - $msgbig = $this->img->getName(); - $msgsmall = wfMsg( 'file-nohires' ); + $msgbig = htmlspecialchars( $this->img->getName() ); + $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) ); } $params['width'] = $width;