Make WordPress Core

Changeset 48593


Ignore:
Timestamp:
07/24/2020 12:01:32 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Formatting: Filter out the bullet character in sanitize_title_with_dashes().

Props roytanck, deepaklalwani, veromary.
Fixes #49791.

Location:
trunk
Files:
2 edited

Legend:

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

    r48590 r48593  
    22642264                '%e2%80%9e',
    22652265                '%e2%80%9f',
     2266                // Bullet.
     2267                '%e2%80%a2',
    22662268                // &copy, &reg, &deg, &hellip, and &trade.
    22672269                '%c2%a9',
  • trunk/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php

    r46586 r48593  
    102102    }
    103103
     104    /**
     105     * @ticket 49791
     106     */
     107    function test_replaces_bullet() {
     108        $this->assertEquals( 'fancy-title-amazing', sanitize_title_with_dashes( 'Fancy Title • Amazing', '', 'save' ) );
     109    }
     110
    104111    function test_replaces_copy_reg_deg_trade() {
    105112        $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just © a Slug', '', 'save' ) );
Note: See TracChangeset for help on using the changeset viewer.