* (bug 25800) mw.config wgAction should contain the actually performed action instead
of whatever the query value contains.
* (bug 4438) Add CSS hook for current WikiPage action.
-* (bug 33703) Common border-bottom color for <abbr> should inherit default (text) color
-* (bug 33819) Display filesize on Special:NewFiles in appropriate unit.
+* (bug 33703) Common border-bottom color for <abbr> should inherit default (text) color.
+* (bug 33819) Display file sizes in appropriate units.
=== API changes in 1.19 ===
* Made action=edit less likely to return "unknownerror", by returning the actual error
*/
function getShortDesc( $file ) {
global $wgLang;
- return $wgLang->formatSize( $file->getSize() );
+ return htmlspecialchars( $wgLang->formatSize( $file->getSize() ) );
}
/**
*/
function getLongDesc( $file ) {
global $wgLang;
- return wfMessage( 'file-info', $wgLang->formatSize( $file->getSize() ),
+ return wfMessage( 'file-info', htmlspecialchars( $wgLang->formatSize( $file->getSize() ) ),
$file->getMimeType() )->parse();
}
*/
function getShortDesc( $file ) {
global $wgLang;
- $nbytes = $wgLang->formatSize( $file->getSize() );
+ $nbytes = htmlspecialchars( $wgLang->formatSize( $file->getSize() ) );
$widthheight = wfMessage( 'widthheight' )->numParams( $file->getWidth(), $file->getHeight() )->escaped();
return "$widthheight ($nbytes)";
function getLongDesc( $file ) {
global $wgLang;
$pages = $file->pageCount();
+ $size = htmlspecialchars( $wgLang->formatSize( $file->getSize() ) );
if ( $pages === false || $pages <= 1 ) {
$msg = wfMessage( 'file-info-size' )->numParams( $file->getWidth(),
- $file->getHeight() )->params( $wgLang->formatSize( $file->getSize() ),
+ $file->getHeight() )->params( $size,
$file->getMimeType() )->parse();
} else {
$msg = wfMessage( 'file-info-size-pages' )->numParams( $file->getWidth(),
- $file->getHeight() )->params( $wgLang->formatSize( $file->getSize() ),
+ $file->getHeight() )->params( $size,
$file->getMimeType() )->numParams( $pages )->parse();
}
return $msg;
$download = Linker::makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) );
$lang = $this->getLanguage();
- $bytes = $fileSize = $lang->formatSize( $result->img_size );
+ $bytes = htmlspecialchars( $lang->formatSize( $result->img_size ) );
$dimensions = htmlspecialchars( wfMsg( 'widthheight',
$lang->formatNum( $result->img_width ),
$lang->formatNum( $result->img_height )