diff --git tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php
index 80be941..222e25f 100644
|
|
class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { |
59 | 59 | $this->assertEquals("onetwo", sanitize_title_with_dashes("One&Two", '', 'save')); |
60 | 60 | } |
61 | 61 | |
| 62 | /** |
| 63 | * @ticket 10823 |
| 64 | */ |
| 65 | public function test_strips_unencoded_ampersand_when_followed_by_semicolon() { |
| 66 | $this->assertEquals("one-two", sanitize_title_with_dashes("One & Two;", '', 'save')); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * @ticket 10823 |
| 71 | */ |
| 72 | public function test_strips_unencoded_ampersand_when_not_surrounded_by_spaces_and_followed_by_semicolon() { |
| 73 | $this->assertEquals("onetwo-test", sanitize_title_with_dashes("One&Two Test;", '', 'save')); |
| 74 | } |
| 75 | |
| 76 | |
62 | 77 | function test_replaces_nbsp() { |
63 | 78 | $this->assertEquals("dont-break-the-space", sanitize_title_with_dashes("don't break the space", '', 'save')); |
64 | 79 | } |
diff --git tests/phpunit/tests/formatting/SanitizeUser.php tests/phpunit/tests/formatting/SanitizeUser.php
index 5087df7..bf2cca2 100644
|
|
class Tests_Formatting_SanitizeUser extends WP_UnitTestCase { |
18 | 18 | $this->assertEquals("ATT Test;", sanitize_user("AT&T Test;")); |
19 | 19 | } |
20 | 20 | |
| 21 | /** |
| 22 | * @ticket 10823 |
| 23 | */ |
| 24 | public function test_strips_unencoded_ampersand_when_followed_by_semicolon() { |
| 25 | $this->assertEquals("AT&T Test;", sanitize_user("AT&T Test;")); |
| 26 | } |
| 27 | |
21 | 28 | function test_strips_percent_encoded_octets() { |
22 | 29 | $expected = is_multisite() ? 'franois' : 'Franois'; |
23 | 30 | $this->assertEquals( $expected, sanitize_user( "Fran%c3%a7ois" ) ); |