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/tests/phpunit/tests/dependencies/styles.php

    r52036 r52715  
    196196     *
    197197     * @ticket 54243
     198     * @ticket 54922
    198199     *
    199200     * @covers ::_wp_normalize_relative_css_links
     
    231232                'css'      => 'p {background-image: url(\'http://foo.com/image2.png\');}',
    232233                'expected' => 'p {background-image: url(\'http://foo.com/image2.png\');}',
     234            ),
     235            'An HTML ID'                                   => array(
     236                'css'      => 'clip-path: url(#image1);',
     237                'expected' => 'clip-path: url(#image1);',
    233238            ),
    234239        );
Note: See TracChangeset for help on using the changeset viewer.