Improved on r73093 by allowing jQuery to properly escape some HTML attributes.
authorTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 1 Oct 2010 18:11:07 +0000 (18:11 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 1 Oct 2010 18:11:07 +0000 (18:11 +0000)
resources/mediawiki/mediawiki.js

index fab4a53..465e147 100644 (file)
@@ -675,12 +675,12 @@ window.mediaWiki = new ( function( $ ) {
                                if ( modules.substr( 0, 7 ) == 'http://' || modules.substr( 0, 8 ) == 'https://' ) {
                                        if ( type === 'text/css' ) {
                                                setTimeout(  function() {
-                                                       $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + modules + '" />' );
+                                                       $( 'head' ).append( '<link rel="stylesheet" type="text/css" />' ).attr( 'href', modules );
                                                }, 0 );
                                                return true;
                                        } else if ( type === 'text/javascript' || typeof type === 'undefined' ) {
                                                setTimeout(  function() {
-                                                       $( 'body' ).append( '<script type="text/javascript" src="' + modules + '"></script>' );
+                                                       $( 'body' ).append( '<script type="text/javascript"></script>'  ).attr( 'src', modules )
                                                }, 0 );
                                                return true;
                                        }