diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 4b596ea077..9daee4ca71 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -2263,6 +2263,8 @@ function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'displa '%e2%80%9b', '%e2%80%9e', '%e2%80%9f', + // Bullet. + '%e2%80%a2', // ©, ®, °, &hellip, and &trade. '%c2%a9', '%c2%ae', diff --git a/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php b/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php index c3059614e3..4fcce5bb39 100644 --- a/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php +++ b/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php @@ -101,6 +101,13 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { $this->assertEquals( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its „Curly Joe‟', '', 'save' ) ); } + /** + * @ticket 49791 + */ + function test_replaces_bullet() { + $this->assertEquals( 'fancy-title-amazing', sanitize_title_with_dashes( 'Fancy Title • Amazing', '', 'save' ) ); + } + function test_replaces_copy_reg_deg_trade() { $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just © a Slug', '', 'save' ) ); $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( '® Just a Slug', '', 'save' ) );