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
git-svn-id: https://develop.svn.wordpress.org/trunk@22255 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
44a84d7b06
commit
e033812490
@ -2824,10 +2824,16 @@ function sanitize_option($option, $value) {
|
||||
case 'mailserver_url':
|
||||
case 'mailserver_login':
|
||||
case 'mailserver_pass':
|
||||
case 'ping_sites':
|
||||
case 'upload_path':
|
||||
$value = strip_tags($value);
|
||||
$value = wp_kses_data($value);
|
||||
$value = strip_tags( $value );
|
||||
$value = wp_kses_data( $value );
|
||||
break;
|
||||
|
||||
case 'ping_sites':
|
||||
$value = explode( "\n", $value );
|
||||
$value = array_filter( array_map( 'trim', $value ) );
|
||||
$value = array_filter( array_map( 'esc_url_raw', $value ) );
|
||||
$value = implode( "\n", $value );
|
||||
break;
|
||||
|
||||
case 'gmt_offset':
|
||||
|
Loading…
Reference in New Issue
Block a user