global $wgStylePath, $wgStyleVersion;
$expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
$collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
- $wgOut->addHTML( "<h2 id=\"metadata\">" . wfMsgHtml( 'metadata' ) . "</h2>\n" );
+ $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
$wgOut->addWikiText( $this->makeMetadataTable( $exif ) );
$wgOut->addHTML(
"<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
}
# External editing link
- $elink = $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
+ $elink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
$wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
$wgOut->addHtml( '</ul>' );
{
global $wgUser, $wgOut;
- $wgOut->addHTML( '<h2 id="filelinks">' . wfMsg( 'imagelinks' ) . "</h2>\n" );
+ $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" );
$dbr =& wfGetDB( DB_SLAVE );
$page = $dbr->tableName( 'page' );
}
function beginImageHistoryList() {
- $s = "\n<h2 id=\"filehistory\">" . wfMsg( 'imghistory' ) . "</h2>\n" .
- "<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
+ $s = "\n" .
+ Xml::element( 'h2', array( 'id' => 'filehistory' ), wfMsg( 'imghistory' ) ) .
+ "\n<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
return $s;
}
global $wgUser, $wgLang, $wgTitle, $wgContLang;
$datetime = $wgLang->timeanddate( $timestamp, true );
- $del = wfMsg( 'deleteimg' );
- $delall = wfMsg( 'deleteimgcompletely' );
- $cur = wfMsg( 'cur' );
+ $del = wfMsgHtml( 'deleteimg' );
+ $delall = wfMsgHtml( 'deleteimgcompletely' );
+ $cur = wfMsgHtml( 'cur' );
if ( $iscur ) {
$url = Image::imageUrl( $img );
if( $wgUser->getID() != 0 && $wgTitle->userCanEdit() ) {
$token = urlencode( $wgUser->editToken( $img ) );
$rlink = $this->skin->makeKnownLinkObj( $wgTitle,
- wfMsg( 'revertimg' ), 'action=revert&oldimage=' .
+ wfMsgHtml( 'revertimg' ), 'action=revert&oldimage=' .
urlencode( $img ) . "&wpEditToken=$token" );
$dlink = $this->skin->makeKnownLinkObj( $wgTitle,
$del, 'action=delete&oldimage=' . urlencode( $img ) .
# Having live active links for non-logged in users
# means that bots and spiders crawling our site can
# inadvertently change content. Baaaad idea.
- $rlink = wfMsg( 'revertimg' );
+ $rlink = wfMsgHtml( 'revertimg' );
$dlink = $del;
}
}
$userlink = $this->skin->userLink( $user, $usertext ) . $this->skin->userToolLinks( $user, $usertext );
$nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
$wgLang->formatNum( $size ) );
- $widthheight = wfMsg( 'widthheight', $width, $height );
+ $widthheight = wfMsgHtml( 'widthheight', $width, $height );
$style = $this->skin->getInternalLinkAttributes( $url, $datetime );
$s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a> . . {$userlink} . . {$widthheight} ({$nbytes})";