Ticket #26171: 26171.diff
File 26171.diff, 635 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/formatting.php
3454 3454 * @return string The found URL. 3455 3455 */ 3456 3456 function get_url_in_content( $content ) { 3457 if ( empty( $content ) ) 3458 return ''; 3457 if ( empty( $content ) ) { 3458 return false; 3459 } 3459 3460 3460 if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) 3461 if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) { 3461 3462 return esc_url_raw( $matches[2] ); 3463 } 3462 3464 3463 3465 return false; 3464 3466 }