mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Customize: Fix HTTPS navigation of site in preview on IE11.
Accounts for HTTPS links (port 443) where [40318] only accounted for HTTP links (port 80). Addresses issue in IE11 where the default port number is unexpectedly included on `link.host` for links dynamically created by scripts. Props mattwiebe. Amends [40318], [38890]. See #38409. Fixes #40198. Built from https://develop.svn.wordpress.org/trunk@40381 git-svn-id: http://core.svn.wordpress.org/trunk@40288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
162785c65f
commit
19d960e257
@ -655,7 +655,7 @@ window.wp = window.wp || {};
|
||||
var urlParser = document.createElement( 'a' );
|
||||
urlParser.href = to;
|
||||
// Port stripping needed by IE since it adds to host but not to event.origin.
|
||||
return urlParser.protocol + '//' + urlParser.host.replace( /:80$/, '' );
|
||||
return urlParser.protocol + '//' + urlParser.host.replace( /:(80|443)$/, '' );
|
||||
});
|
||||
|
||||
// first add with no value
|
||||
|
2
wp-includes/js/customize-base.min.js
vendored
2
wp-includes/js/customize-base.min.js
vendored
File diff suppressed because one or more lines are too long
@ -286,11 +286,11 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
elementHost = element.host.replace( /:80$/, '' );
|
||||
elementHost = element.host.replace( /:(80|443)$/, '' );
|
||||
parsedAllowedUrl = document.createElement( 'a' );
|
||||
matchesAllowedUrl = ! _.isUndefined( _.find( api.settings.url.allowed, function( allowedUrl ) {
|
||||
parsedAllowedUrl.href = allowedUrl;
|
||||
return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host.replace( /:80$/, '' ) === elementHost && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) );
|
||||
return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host.replace( /:(80|443)$/, '' ) === elementHost && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) );
|
||||
} ) );
|
||||
if ( ! matchesAllowedUrl ) {
|
||||
return false;
|
||||
|
2
wp-includes/js/customize-preview.min.js
vendored
2
wp-includes/js/customize-preview.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40380';
|
||||
$wp_version = '4.8-alpha-40381';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user