/**
* Set the caption (as plain text)
*
- * @param $caption Caption
+ * @param $caption string Caption
*/
function setCaption( $caption ) {
$this->mCaption = htmlspecialchars( $caption );
/**
* isEmpty() returns true if the gallery contains no images
+ * @return bool
*/
function isEmpty() {
return empty( $this->mImages );
* - the additional text provided when adding the image
* - the size of the image
*
+ * @return string
*/
function toHTML() {
global $wgLang;
if( $this->mShowBytes ) {
if( $img ) {
- $fileSize = $wgLang->formatSize( $img->getSize() );
+ $fileSize = htmlspecialchars( $wgLang->formatSize( $img->getSize() ) );
} else {
$fileSize = wfMsgHtml( 'filemissing' );
}