Changeset 41318
- Timestamp:
- 08/25/2017 11:27:55 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r41109 r41318 2001 2001 // Convert nbsp, ndash and mdash HTML entities to hyphens 2002 2002 $title = str_replace( array( ' ', ' ', '–', '–', '—', '—' ), '-', $title ); 2003 // Convert forward slash to hyphen 2004 $title = str_replace( '/', '-', $title ); 2003 2005 2004 2006 // Strip these characters entirely -
trunk/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php
r36775 r41318 110 110 111 111 /** 112 * @ticket 10792 113 */ 114 function test_replaces_forward_slash() { 115 $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon/McCartney", '', 'save')); 116 $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon//McCartney", '', 'save')); 117 $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon///McCartney", '', 'save')); 118 $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("songs by Lennon/-McCartney", '', 'save')); 119 $this->assertEquals("songs-by-lennon-mccartney", sanitize_title_with_dashes("//songs by Lennon/McCartney", '', 'save')); 120 } 121 122 /** 112 123 * @ticket 19820 113 124 */
Note: See TracChangeset
for help on using the changeset viewer.