Changeset 11242
- Timestamp:
- 09/17/2021 01:59:58 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/comment-moderation.php
r9593 r11242 23 23 24 24 // Get whitelisted URLs. 25 // Note: unnecessary to specify subdomains 25 // Note: unnecessary to specify subdomains, do not include trailing slash. 26 26 $whitelist_urls = array( 27 27 'wordpress.org', 28 'github.com/WordPress', 28 29 ); 29 30 … … 60 61 61 62 // Count the number of occurrences of this particular whitelisted URL. 62 $num_whitelist_links = preg_match_all( '%<a [^>]*href= [\'\"]https?://[^/>]*' . preg_quote( $url, '%' ) . '%i', $comment, $out );63 $num_whitelist_links = preg_match_all( '%<a [^>]*href=([\'\"])https?://([^/>]+\.)?' . preg_quote( $url, '%' ) . '(/|\\1)%i', $comment, $out ); 63 64 64 65 // Increase the limit by the number of whitelisted URLs (so that they don't
Note: See TracChangeset
for help on using the changeset viewer.