Make WordPress Core


Ignore:
Timestamp:
10/17/2012 05:44:40 PM (12 years ago)
Author:
ryan
Message:

Pass each url in ping_sites through esc_url_raw() upin save. This ensures the urls have a valid protocol and avoids "Unable to parse URL" warning in WP_Http. Props SergeyBiryukov. fixes #21966

File:
1 edited

Legend:

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

    r22135 r22255  
    28252825        case 'mailserver_login':
    28262826        case 'mailserver_pass':
     2827        case 'upload_path':
     2828            $value = strip_tags( $value );
     2829            $value = wp_kses_data( $value );
     2830            break;
     2831
    28272832        case 'ping_sites':
    2828         case 'upload_path':
    2829             $value = strip_tags($value);
    2830             $value = wp_kses_data($value);
     2833            $value = explode( "\n", $value );
     2834            $value = array_filter( array_map( 'trim', $value ) );
     2835            $value = array_filter( array_map( 'esc_url_raw', $value ) );
     2836            $value = implode( "\n", $value );
    28312837            break;
    28322838
Note: See TracChangeset for help on using the changeset viewer.