Normalize escaping for some image page messages:
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 30 Apr 2007 17:41:12 +0000 (17:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 30 Apr 2007 17:41:12 +0000 (17:41 +0000)
* 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 "<small>" 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

includes/ImagePage.php

index 84863d8..e593082 100644 (file)
@@ -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;