3236
3236
* @return string URLs starting with the http or https protocol, separated by a carriage return.
3238
3238
function sanitize_trackback_urls( $to_ping ) {
3239
$urls_to_ping = preg_split( '/\r\n\t /', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY );
3239
$urls_to_ping = preg_split( '/[\r\n\t ]/', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY );
3240
3240
foreach ( $urls_to_ping as $k => $url ) {
3241
3241
if ( !preg_match( '#^https?://.#i', $url ) )
3242
3242
unset( $urls_to_ping[$k] );