mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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:
parent
8ae2c51069
commit
80a142c6a4
@ -2824,10 +2824,16 @@ function sanitize_option($option, $value) {
|
|||||||
case 'mailserver_url':
|
case 'mailserver_url':
|
||||||
case 'mailserver_login':
|
case 'mailserver_login':
|
||||||
case 'mailserver_pass':
|
case 'mailserver_pass':
|
||||||
case 'ping_sites':
|
|
||||||
case 'upload_path':
|
case 'upload_path':
|
||||||
$value = strip_tags($value);
|
$value = strip_tags( $value );
|
||||||
$value = wp_kses_data($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;
|
break;
|
||||||
|
|
||||||
case 'gmt_offset':
|
case 'gmt_offset':
|
||||||
|
Loading…
Reference in New Issue
Block a user