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
This commit is contained in:
Sergey Biryukov 2024-08-25 22:48:15 +00:00
parent ac72a65949
commit a45c25d272
2 changed files with 2 additions and 2 deletions

View File

@ -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:' )
) {

View File

@ -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.