Make WordPress Core


Ignore:
Timestamp:
02/11/2022 10:51:16 PM (3 years ago)
Author:
audrasjb
Message:

Script Loader: Prevent normalizing HTML IDs in _wp_normalize_relative_css_links().

This change fixes an issue where _wp_normalize_relative_css_links() was not only matching urls, but also HTML IDs.

Follow-up to [52036].

Props mahype, costdev, audrasjb, SergeyBiryukov.
Merges [52695] to the 5.9 branch.
Fixes #54922.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-includes/script-loader.php

    r52665 r52715  
    27712771            }
    27722772
     2773            // Skip if the URL is an HTML ID.
     2774            if ( str_starts_with( $src_result, '#' ) ) {
     2775                continue;
     2776            }
     2777
    27732778            // Build the absolute URL.
    27742779            $absolute_url = dirname( $stylesheet_url ) . '/' . $src_result;
Note: See TracChangeset for help on using the changeset viewer.