Changeset 38048
- Timestamp:
- 07/13/2016 02:04:10 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r38047 r38048 1077 1077 || preg_match($pattern, $email) 1078 1078 || preg_match($pattern, $url) 1079 || preg_match($pattern, $comment) 1079 1080 || preg_match($pattern, $comment_without_html) 1080 1081 || preg_match($pattern, $user_ip) -
trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php
r38047 r38048 21 21 } 22 22 23 /** 24 * @ticket 37208 25 */ 23 26 public function test_should_return_true_when_content_with_html_matches_blacklist_keys() { 24 27 $author = 'Sting'; … … 66 69 } 67 70 71 /** 72 * @ticket 37208 73 */ 74 public function test_should_return_true_when_link_matches_blacklist_keys() { 75 $author = 'Rainier Wolfcastle'; 76 $author_email = 'rainier@wolfcastle.com'; 77 $author_url = 'http://example.com'; 78 $comment = 'We go on TV and sing, <a href="http://example.com/spam/>sing</a>, sing.'; 79 $author_ip = '192.168.0.1'; 80 $user_agent = ''; 81 82 update_option( 'blacklist_keys',"/spam/" ); 83 84 $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 85 86 $this->assertTrue( $result ); 87 } 88 68 89 public function test_should_return_false_when_no_match() { 69 90 $author = 'Krusty the Clown';
Note: See TracChangeset
for help on using the changeset viewer.