diff --git a/wp-includes/https-detection.php b/wp-includes/https-detection.php index 2ced175047..7642fda3da 100644 --- a/wp-includes/https-detection.php +++ b/wp-includes/https-detection.php @@ -204,7 +204,7 @@ function wp_cron_conditionally_prevent_sslverify( $request ) { function wp_is_local_html_output( $html ) { // 1. Check if HTML includes the site's Really Simple Discovery link. if ( has_action( 'wp_head', 'rsd_link' ) ) { - $pattern = esc_url( site_url( 'xmlrpc.php?rsd', 'rpc' ) ); // See rsd_link(). + $pattern = preg_replace( '#^https?:(?=//)#', '', esc_url( site_url( 'xmlrpc.php?rsd', 'rpc' ) ) ); // See rsd_link(). return false !== strpos( $html, $pattern ); } @@ -218,7 +218,7 @@ function wp_is_local_html_output( $html ) { // 3. Check if HTML includes the site's REST API link. if ( has_action( 'wp_head', 'rest_output_link_wp_head' ) ) { // Try both HTTPS and HTTP since the URL depends on context. - $pattern = esc_url( preg_replace( '#^https?:(?=//)#', '', get_rest_url() ) ); // See rest_output_link_wp_head(). + $pattern = preg_replace( '#^https?:(?=//)#', '', esc_url( get_rest_url() ) ); // See rest_output_link_wp_head(). return false !== strpos( $html, $pattern ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5ec3d254cc..4a02ae5c39 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta3-50390'; +$wp_version = '5.7-beta3-50391'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.