Ticket #38409: 38409.3.diff
File 38409.3.diff, 1.6 KB (added by , 8 years ago) |
---|
-
wp-includes/js/customize-base.js
655 655 var urlParser = document.createElement( 'a' ); 656 656 urlParser.href = to; 657 657 // Port stripping needed by IE since it adds to host but not to event.origin. 658 return urlParser.protocol + '//' + urlParser.host.replace( /: 80$/, '' );658 return urlParser.protocol + '//' + urlParser.host.replace( /:(80|443)$/, '' ); 659 659 }); 660 660 661 661 // first add with no value -
wp-includes/js/customize-preview.js
286 286 return false; 287 287 } 288 288 289 elementHost = element.host.replace( /: 80$/, '' );289 elementHost = element.host.replace( /:(80|443)$/, '' ); 290 290 parsedAllowedUrl = document.createElement( 'a' ); 291 291 matchesAllowedUrl = ! _.isUndefined( _.find( api.settings.url.allowed, function( allowedUrl ) { 292 292 parsedAllowedUrl.href = allowedUrl; 293 return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host.replace( /: 80$/, '' ) === elementHost && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) );293 return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host.replace( /:(80|443)$/, '' ) === elementHost && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) ); 294 294 } ) ); 295 295 if ( ! matchesAllowedUrl ) { 296 296 return false;