Make WordPress Core


Ignore:
Timestamp:
10/11/2022 10:27:00 AM (3 years ago)
Author:
audrasjb
Message:

Formatting: Strip object replacement characters from slugs.

This changeset prevents object replacement characters – UTF-8 %ef%bf%bc, used as a placeholder in text for an otherwise unspecified object – from being added to slugs.

Props cantuaria, costdev, audrasjb, SergeyBiryukov, archon810, maciejmackowiak, BaneD, markparnell, ironprogrammer, dmsnell, nikkigagency, webprom.
Fixes #55117.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php

    r53562 r54474  
    152152    /**
    153153     * @ticket 47912
     154     * @ticket 55117
    154155     * @dataProvider data_removes_non_visible_characters_without_width
    155156     *
     
    180181            'only %e2%80%ae'     => array( '%e2%80%ae' ),
    181182            'only %ef%bb%bf'     => array( '%ef%bb%bf' ),
     183            'only %ef%bf%bc'     => array( '%ef%bf%bc' ),
    182184
    183185            // Non-visible characters within the title.
     
    203205    /**
    204206     * @ticket 47912
     207     * @ticket 55117
    205208     * @dataProvider data_non_visible_characters_without_width_when_not_save
    206209     *
     
    231234            'only %e2%80%ae'     => array( '%e2%80%ae', '%e2%80%ae' ),
    232235            'only %ef%bb%bf'     => array( '%ef%bb%bf', '%ef%bb%bf' ),
     236            'only %ef%bf%bc'     => array( '%ef%bf%bc', '%ef%bf%bc' ),
    233237
    234238            // Non-visible characters within the title.
Note: See TracChangeset for help on using the changeset viewer.