Changeset 40381
- Timestamp:
- 04/06/2017 12:31:11 AM (8 years ago)
- Location:
- trunk/src/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/customize-base.js
r39051 r40381 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 -
trunk/src/wp-includes/js/customize-preview.js
r40318 r40381 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 ) {
Note: See TracChangeset
for help on using the changeset viewer.