Ticket #57207: 57207.diff
| File 57207.diff, 1.5 KB (added by , 3 years ago) |
|---|
-
src/wp-includes/comment.php
1357 1357 // in the spam words don't break things: 1358 1358 $word = preg_quote( $word, '#' ); 1359 1359 1360 $pattern = "#$word#i ";1360 $pattern = "#$word#iu"; 1361 1361 if ( preg_match( $pattern, $author ) 1362 1362 || preg_match( $pattern, $email ) 1363 1363 || preg_match( $pattern, $url ) -
tests/phpunit/tests/comment/wpCheckCommentDisallowedList.php
40 40 $this->assertTrue( $result ); 41 41 } 42 42 43 /** 44 * @ticket 57207 45 */ 46 public function test_should_return_true_when_content_with_non_latin_letters_matches_disallowed_keys() { 47 $author = 'Setup'; 48 $author_email = 'setup@example.com'; 49 $author_url = 'http://example.com'; 50 $comment = 'Установка'; 51 $author_ip = '192.168.0.1'; 52 $user_agent = ''; 53 54 update_option( 'disallowed_keys', "установка\nfoo" ); 55 56 $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 57 58 $this->assertTrue( $result ); 59 } 60 43 61 public function test_should_return_true_when_author_matches_disallowed_keys() { 44 62 $author = 'Sideshow Mel'; 45 63 $author_email = 'mel@example.com';