Changeset 19675 for trunk/wp-includes/formatting.php
- Timestamp:
- 01/04/2012 07:45:13 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r19601 r19675 3003 3003 } 3004 3004 3005 /** 3006 * Sanitize space or carriage return separated URLs that are used to send trackbacks. 3007 * 3008 * @since 3.4.0 3009 * 3010 * @param string $to_ping Space or carriage return separated URLs 3011 * @return string URLs starting with the http or https protocol, separated by a carriage return. 3012 */ 3013 function sanitize_trackback_urls( $to_ping ) { 3014 $urls_to_ping = preg_split( '/\r\n\t /', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY ); 3015 foreach ( $urls_to_ping as $k => $url ) { 3016 if ( !preg_match( '#^https?://.#i', $url ) ) 3017 unset( $urls_to_ping[$k] ); 3018 } 3019 $urls_to_ping = array_map( 'esc_url_raw', $urls_to_ping ); 3020 $urls_to_ping = implode( "\n", $urls_to_ping ); 3021 return apply_filters( 'sanitize_trackback_urls', $urls_to_ping, $to_ping ); 3022 } 3023 3005 3024 ?>
Note: See TracChangeset
for help on using the changeset viewer.