Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -227,8 +227,8 @@ |
228 | 228 | * (bug 25800) mw.config wgAction should contain the actually performed action instead |
229 | 229 | of whatever the query value contains. |
230 | 230 | * (bug 4438) Add CSS hook for current WikiPage action. |
231 | | -* (bug 33703) Common border-bottom color for <abbr> should inherit default (text) color |
232 | | -* (bug 33819) Display filesize on Special:NewFiles in appropriate unit. |
| 231 | +* (bug 33703) Common border-bottom color for <abbr> should inherit default (text) color. |
| 232 | +* (bug 33819) Display file sizes in appropriate units. |
233 | 233 | |
234 | 234 | === API changes in 1.19 === |
235 | 235 | * Made action=edit less likely to return "unknownerror", by returning the actual error |
Index: trunk/phase3/includes/specials/SpecialMIMEsearch.php |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | |
97 | 97 | $download = Linker::makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) ); |
98 | 98 | $lang = $this->getLanguage(); |
99 | | - $bytes = $fileSize = $lang->formatSize( $result->img_size ); |
| 99 | + $bytes = htmlspecialchars( $lang->formatSize( $result->img_size ) ); |
100 | 100 | $dimensions = htmlspecialchars( wfMsg( 'widthheight', |
101 | 101 | $lang->formatNum( $result->img_width ), |
102 | 102 | $lang->formatNum( $result->img_height ) |
Index: trunk/phase3/includes/media/Generic.php |
— | — | @@ -405,7 +405,7 @@ |
406 | 406 | */ |
407 | 407 | function getShortDesc( $file ) { |
408 | 408 | global $wgLang; |
409 | | - return $wgLang->formatSize( $file->getSize() ); |
| 409 | + return htmlspecialchars( $wgLang->formatSize( $file->getSize() ) ); |
410 | 410 | } |
411 | 411 | |
412 | 412 | /** |
— | — | @@ -414,7 +414,7 @@ |
415 | 415 | */ |
416 | 416 | function getLongDesc( $file ) { |
417 | 417 | global $wgLang; |
418 | | - return wfMessage( 'file-info', $wgLang->formatSize( $file->getSize() ), |
| 418 | + return wfMessage( 'file-info', htmlspecialchars( $wgLang->formatSize( $file->getSize() ) ), |
419 | 419 | $file->getMimeType() )->parse(); |
420 | 420 | } |
421 | 421 | |
— | — | @@ -710,7 +710,7 @@ |
711 | 711 | */ |
712 | 712 | function getShortDesc( $file ) { |
713 | 713 | global $wgLang; |
714 | | - $nbytes = $wgLang->formatSize( $file->getSize() ); |
| 714 | + $nbytes = htmlspecialchars( $wgLang->formatSize( $file->getSize() ) ); |
715 | 715 | $widthheight = wfMessage( 'widthheight' )->numParams( $file->getWidth(), $file->getHeight() )->escaped(); |
716 | 716 | |
717 | 717 | return "$widthheight ($nbytes)"; |
— | — | @@ -723,13 +723,14 @@ |
724 | 724 | function getLongDesc( $file ) { |
725 | 725 | global $wgLang; |
726 | 726 | $pages = $file->pageCount(); |
| 727 | + $size = htmlspecialchars( $wgLang->formatSize( $file->getSize() ) ); |
727 | 728 | if ( $pages === false || $pages <= 1 ) { |
728 | 729 | $msg = wfMessage( 'file-info-size' )->numParams( $file->getWidth(), |
729 | | - $file->getHeight() )->params( $wgLang->formatSize( $file->getSize() ), |
| 730 | + $file->getHeight() )->params( $size, |
730 | 731 | $file->getMimeType() )->parse(); |
731 | 732 | } else { |
732 | 733 | $msg = wfMessage( 'file-info-size-pages' )->numParams( $file->getWidth(), |
733 | | - $file->getHeight() )->params( $wgLang->formatSize( $file->getSize() ), |
| 734 | + $file->getHeight() )->params( $size, |
734 | 735 | $file->getMimeType() )->numParams( $pages )->parse(); |
735 | 736 | } |
736 | 737 | return $msg; |
Index: trunk/phase3/includes/ImageGallery.php |
— | — | @@ -314,7 +314,7 @@ |
315 | 315 | |
316 | 316 | if( $this->mShowBytes ) { |
317 | 317 | if( $img ) { |
318 | | - $fileSize = $wgLang->formatSize( $img->getSize() ); |
| 318 | + $fileSize = htmlspecialchars( $wgLang->formatSize( $img->getSize() ) ); |
319 | 319 | } else { |
320 | 320 | $fileSize = wfMsgHtml( 'filemissing' ); |
321 | 321 | } |