Make WordPress Core


Ignore:
Timestamp:
08/25/2024 10:46:43 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

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: RFC 1808, Section 4, Step 4.

Follow-up to [52036], [52695], [52754], [55658], [55669].

Props scholdstrom.
Fixes #61909.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r58931 r58932  
    30573057                str_starts_with( $url, 'http:' ) ||
    30583058                str_starts_with( $url, 'https:' ) ||
    3059                 str_starts_with( $url, '//' ) ||
     3059                str_starts_with( $url, '/' ) ||
    30603060                str_starts_with( $url, '#' ) ||
    30613061                str_starts_with( $url, 'data:' )
Note: See TracChangeset for help on using the changeset viewer.