diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index e0b45fd..fd3faf1 100644
|
|
function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'displa |
1608 | 1608 | $title = str_replace( '%c3%97', 'x', $title ); |
1609 | 1609 | } |
1610 | 1610 | |
| 1611 | $title = str_replace('+', '', $title); |
| 1612 | $title = str_replace('=', '', $title); |
1611 | 1613 | $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); |
1612 | 1614 | $title = preg_replace('/\s+/', '-', $title); |
1613 | 1615 | $title = preg_replace('|-+|', '-', $title); |
diff --git tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php
index 80be941..b1a5046 100644
|
|
class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { |
114 | 114 | $this->assertEquals("aaaa", sanitize_title_with_dashes("ááa´aˊ", '', 'save')); |
115 | 115 | } |
116 | 116 | |
| 117 | /** |
| 118 | * @ticket 32729 |
| 119 | */ |
| 120 | function test_removes_pluses() { |
| 121 | $this->assertEquals("1+2", sanitize_title_with_dashes("12", '', 'save')); |
| 122 | $this->assertEquals("math-is-hard-34", sanitize_title_with_dashes("math is hard 3+4+", '', 'save')); |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * @ticket 32729 |
| 127 | */ |
| 128 | function test_removes_equal_signs() { |
| 129 | $this->assertEquals("5=6", sanitize_title_with_dashes("56", '', 'save')); |
| 130 | $this->assertEquals("math-is-hard-77", sanitize_title_with_dashes("math is hard 7=7", '', 'save')); |
| 131 | } |
117 | 132 | } |