@@ -6,7 +6,7 @@ require(['sub1'], function (sub1) {});
6
6
define ( "main" , function ( ) { } ) ;
7
7
8
8
/**
9
- * @license text 2.0.14 Copyright jQuery Foundation and other contributors.
9
+ * @license text 2.0.15 Copyright jQuery Foundation and other contributors.
10
10
* Released under MIT license, http://github.com/requirejs/text/LICENSE
11
11
*/
12
12
/*jslint regexp: true */
@@ -28,8 +28,26 @@ define('text',['module'], function (module) {
28
28
buildMap = { } ,
29
29
masterConfig = ( module . config && module . config ( ) ) || { } ;
30
30
31
+ function useDefault ( value , defaultValue ) {
32
+ return value === undefined || value === '' ? defaultValue : value ;
33
+ }
34
+
35
+ //Allow for default ports for http and https.
36
+ function isSamePort ( protocol1 , port1 , protocol2 , port2 ) {
37
+ if ( port1 === port2 ) {
38
+ return true ;
39
+ } else if ( protocol1 === protocol2 ) {
40
+ if ( protocol1 === 'http' ) {
41
+ return useDefault ( port1 , '80' ) === useDefault ( port2 , '80' ) ;
42
+ } else if ( protocol1 === 'https' ) {
43
+ return useDefault ( port1 , '443' ) === useDefault ( port2 , '443' ) ;
44
+ }
45
+ }
46
+ return false ;
47
+ }
48
+
31
49
text = {
32
- version : '2.0.14 ' ,
50
+ version : '2.0.15 ' ,
33
51
34
52
strip : function ( content ) {
35
53
//Strips <?xml ...?> declarations so that external SVG and XML
@@ -147,7 +165,7 @@ define('text',['module'], function (module) {
147
165
148
166
return ( ! uProtocol || uProtocol === protocol ) &&
149
167
( ! uHostName || uHostName . toLowerCase ( ) === hostname . toLowerCase ( ) ) &&
150
- ( ( ! uPort && ! uHostName ) || uPort === port ) ;
168
+ ( ( ! uPort && ! uHostName ) || isSamePort ( uProtocol , uPort , protocol , port ) ) ;
151
169
} ,
152
170
153
171
finishLoad : function ( name , strip , content , onLoad ) {
0 commit comments