mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Formatting: In sanitize_title_with_dashes(), convert forward slash to hyphen on save.
Props corvidism, jtsternberg, GhostToast, alxndr. Fixes #10792. git-svn-id: https://develop.svn.wordpress.org/trunk@41318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -108,6 +108,17 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
|
||||
$this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just ™ a Slug", '', 'save'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 10792
|
||||
*/
|
||||
function test_replaces_forward_slash() {
|
||||
$this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon/McCartney", '', 'save'));
|
||||
$this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon//McCartney", '', 'save'));
|
||||
$this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon///McCartney", '', 'save'));
|
||||
$this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon/-McCartney", '', 'save'));
|
||||
$this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("//songs by Lennon/McCartney", '', 'save'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 19820
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user