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: http://core.svn.wordpress.org/trunk@22255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-10-17 17:44:40 +00:00
parent 8ae2c51069
commit 80a142c6a4
1 changed files with 9 additions and 3 deletions

View File

@ -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':