r36593 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36592‎ | r36593 | r36594 >
Date:11:37, 24 June 2008
Author:ialex
Status:old
Tags:
Comment:
Fix XHTML errors, be sure that messages are escaped
Modified paths:
  • /trunk/extensions/Interwiki/SpecialInterwiki_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Interwiki/SpecialInterwiki_body.php
@@ -74,7 +74,7 @@
7575 $dbr = wfGetDB( DB_SLAVE );
7676 $row = $dbr->selectRow( 'interwiki', '*', array( 'iw_prefix' => $prefix ) );
7777 if( !$row ){
78 - $errormessage = wfMsgHtml( 'interwiki_editerror' );
 78+ $errormessage = wfMsgHtml( 'interwiki_editerror', $prefix );
7979 $wgOut->addWikiText( "<br /><div class=\"error\">$errormessage</div><br />" );
8080 return;
8181 }
@@ -85,7 +85,7 @@
8686 $local = $row->iw_local ? " checked='checked'" : '';
8787 $old = "<input type='hidden' name='prefix' value='" . htmlspecialchars( $row->iw_prefix ) . "' />";
8888 $topmessage = wfMsgHtml( 'interwiki_edittext' );
89 - $intromessage = wfMsg( 'interwiki_editintro' );
 89+ $intromessage = wfMsgHtml( 'interwiki_editintro' );
9090 $button = wfMsgHtml( 'edit' );
9191 } else {
9292 $prefix = "<input tabindex='1' type='text' name='prefix' maxlength='20' size='20' />";
@@ -94,7 +94,7 @@
9595 $old = '';
9696 $defaulturl = wfMsgHtml( 'interwiki_defaulturl' );
9797 $topmessage = wfMsgHtml( 'interwiki_addtext' );
98 - $intromessage = wfMsg( 'interwiki_addintro' );
 98+ $intromessage = wfMsgHtml( 'interwiki_addintro' );
9999 $button = wfMsgHtml( 'interwiki_addbutton' );
100100 }
101101
@@ -105,7 +105,7 @@
106106 $reasonmessage = wfMsgHtml( 'interwiki_reasonfield' );
107107 $urlmessage = wfMsgHtml( 'interwiki_url' );
108108 $token = htmlspecialchars( $wgUser->editToken() );
109 - $defaultreason = wfMsgForContent( 'interwiki_defaultreason' );
 109+ $defaultreason = htmlspecialchars( wfMsgForContent( 'interwiki_defaultreason' ) );
110110
111111 $wgOut->addHTML(
112112 "<fieldset>

Follow-up revisions

RevisionCommit summaryAuthorDate
r36822Cleanup for r36593 -- wfMsgHtml() escapes the _message_ prior to parameter re...brion19:57, 30 June 2008

Status & tagging log