mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54474 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -151,6 +151,7 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 47912
|
||||
* @ticket 55117
|
||||
* @dataProvider data_removes_non_visible_characters_without_width
|
||||
*
|
||||
* @param string $title The title to be sanitized.
|
||||
@@ -179,6 +180,7 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
|
||||
'only %e2%80%ad' => array( '%e2%80%ad' ),
|
||||
'only %e2%80%ae' => array( '%e2%80%ae' ),
|
||||
'only %ef%bb%bf' => array( '%ef%bb%bf' ),
|
||||
'only %ef%bf%bc' => array( '%ef%bf%bc' ),
|
||||
|
||||
// Non-visible characters within the title.
|
||||
'in middle of title' => array(
|
||||
@@ -202,6 +204,7 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 47912
|
||||
* @ticket 55117
|
||||
* @dataProvider data_non_visible_characters_without_width_when_not_save
|
||||
*
|
||||
* @param string $title The title to be sanitized.
|
||||
@@ -230,6 +233,7 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
|
||||
'only %e2%80%ad' => array( '%e2%80%ad', '%e2%80%ad' ),
|
||||
'only %e2%80%ae' => array( '%e2%80%ae', '%e2%80%ae' ),
|
||||
'only %ef%bb%bf' => array( '%ef%bb%bf', '%ef%bb%bf' ),
|
||||
'only %ef%bf%bc' => array( '%ef%bf%bc', '%ef%bf%bc' ),
|
||||
|
||||
// Non-visible characters within the title.
|
||||
'in middle of title' => array(
|
||||
|
||||
Reference in New Issue
Block a user