Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -1137,7 +1137,7 @@ |
1138 | 1138 | * "text/javascript"; if no type is provided, text/javascript is assumed. |
1139 | 1139 | */ |
1140 | 1140 | load: function ( modules, type ) { |
1141 | | - var filtered, m, reValidURL; |
| 1141 | + var filtered, m; |
1142 | 1142 | |
1143 | 1143 | // Validate input |
1144 | 1144 | if ( typeof modules !== 'object' && typeof modules !== 'string' ) { |
— | — | @@ -1146,8 +1146,7 @@ |
1147 | 1147 | // Allow calling with an external url or single dependency as a string |
1148 | 1148 | if ( typeof modules === 'string' ) { |
1149 | 1149 | // Support adding arbitrary external scripts |
1150 | | - reValidURL = new RegExp( '^((https?:)?\\/\\/|' + $.escapeRE( mw.config.get( 'wgScript' ) ) + ')' ); |
1151 | | - if ( reValidURL.test( modules ) ) { |
| 1150 | + if ( /^(https?:)?\/\//.test( modules ) ) { |
1152 | 1151 | if ( type === 'text/css' ) { |
1153 | 1152 | $( 'head' ).append( $( '<link>', { |
1154 | 1153 | rel: 'stylesheet', |