r22844 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22843‎ | r22844 | r22845 >
Date:16:39, 8 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Wrap the recreate-deleted warning dismisser in a CDATA section and run the message through Xml::escapeJsString()
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -2072,11 +2072,13 @@
20732073 * @return string
20742074 */
20752075 private function buildWarningDismisser() {
2076 - return '<script type="text/javascript">'
 2076+ global $wgJsMimeType;
 2077+ return '<script type="' . $wgJsMimeType . '">/*<![CDATA[*/'
20772078 . 'document.write( \'<div class="mw-recreate-deleted-control">'
20782079 . '<a href="javascript:dismissRecreateWarning();">'
2079 - . wfMsgHtml( 'recreate-deleted-dismiss' ) . '</a></div>\' );'
2080 - . '</script>';
 2080+ . Xml::escapeJsString( wfMsg( 'recreate-deleted-dismiss' ) )
 2081+ . '</a></div>\' );'
 2082+ . '/*]]>*/</script>';
20812083 }
20822084
20832085 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r22857Merged revisions 22811-22855 via svnmerge from...david00:48, 9 June 2007

Status & tagging log