r74083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74082‎ | r74083 | r74084 >
Date:18:11, 1 October 2010
Author:tparscal
Status:ok
Tags:
Comment:
Improved on r73093 by allowing jQuery to properly escape some HTML attributes.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -675,12 +675,12 @@
676676 if ( modules.substr( 0, 7 ) == 'http://' || modules.substr( 0, 8 ) == 'https://' ) {
677677 if ( type === 'text/css' ) {
678678 setTimeout( function() {
679 - $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + modules + '" />' );
 679+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" />' ).attr( 'href', modules );
680680 }, 0 );
681681 return true;
682682 } else if ( type === 'text/javascript' || typeof type === 'undefined' ) {
683683 setTimeout( function() {
684 - $( 'body' ).append( '<script type="text/javascript" src="' + modules + '"></script>' );
 684+ $( 'body' ).append( '<script type="text/javascript"></script>' ).attr( 'src', modules )
685685 }, 0 );
686686 return true;
687687 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73093Added importScriptURI/importStylesheetURI-like functionality.tparscal22:07, 15 September 2010

Status & tagging log