From a45c25d2726d0ec300817ffd1a2bb66c09988ecb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 25 Aug 2024 22:48:15 +0000 Subject: [PATCH] Script Loader: Do not normalize absolute paths in inline block styles CSS. `_wp_normalize_relative_css_links()` used to normalize all non-absolute URLs regardless of whether it's a relative path or an absolute path. The normalization should only happen for relative paths (paths without a leading `/`) and not for absolute paths. Reference: [https://www.rfc-editor.org/rfc/rfc1808#section-4 RFC 1808, Section 4, Step 4]. Follow-up to [52036], [52695], [52754], [55658], [55669]. Props scholdstrom. Fixes #61909. Built from https://develop.svn.wordpress.org/trunk@58932 git-svn-id: http://core.svn.wordpress.org/trunk@58328 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index dcf86309b3..0c71a1b3b0 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -3056,7 +3056,7 @@ function _wp_normalize_relative_css_links( $css, $stylesheet_url ) { if ( str_starts_with( $url, 'http:' ) || str_starts_with( $url, 'https:' ) || - str_starts_with( $url, '//' ) || + str_starts_with( $url, '/' ) || str_starts_with( $url, '#' ) || str_starts_with( $url, 'data:' ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 459e324eae..bbac76b09e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58931'; +$wp_version = '6.7-alpha-58932'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.