Make WordPress Core


Ignore:
Timestamp:
01/04/2012 07:45:13 PM (14 years ago)
Author:
ryan
Message:

Introduce sanitize_trackback_urls(). Don't ping bad urls. Don't ping bad urls or save them to the DB. Props xknown, SergeyBiryukov. fixes #17560

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r19593 r19675  
    25382538
    25392539    if ( isset($to_ping) )
    2540         $to_ping = preg_replace('|\s+|', "\n", $to_ping);
     2540        $to_ping = sanitize_trackback_urls( $to_ping );
    25412541    else
    25422542        $to_ping = '';
     
    30653065    global $wpdb;
    30663066    $to_ping = $wpdb->get_var( $wpdb->prepare( "SELECT to_ping FROM $wpdb->posts WHERE ID = %d", $post_id ));
    3067     $to_ping = trim($to_ping);
     3067    $to_ping = sanitize_trackback_urls( $to_ping );
    30683068    $to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY);
    30693069    $to_ping = apply_filters('get_to_ping',  $to_ping);
Note: See TracChangeset for help on using the changeset viewer.