Ticket #59818: 59818.diff
| File 59818.diff, 1.2 KB (added by , 2 years ago) |
|---|
-
src/wp-includes/formatting.php
4961 4961 break; 4962 4962 4963 4963 case 'ping_sites': 4964 $value = explode( "\n", $value ); 4964 if ( is_string( $value ) ) { 4965 $value = explode( "\n", $value ); 4966 } else { 4967 $value = array(); 4968 } 4969 4965 4970 $value = array_filter( array_map( 'trim', $value ) ); 4966 4971 $value = array_filter( array_map( 'sanitize_url', $value ) ); 4967 4972 $value = implode( "\n", $value ); -
tests/phpunit/tests/option/sanitizeOption.php
44 44 array( 'date_format', 'F j, Y', 'F j, <strong>Y</strong>' ), 45 45 array( 'ping_sites', 'http://rpc.pingomatic.com/', 'http://rpc.pingomatic.com/' ), 46 46 array( 'ping_sites', "http://www.example.com\nhttp://example.org", "www.example.com \n\texample.org\n\n" ), 47 array( 'ping_sites', '', null ), 47 48 array( 'gmt_offset', '0', 0 ), 48 49 array( 'gmt_offset', '1.5', '1.5' ), 49 50 array( 'gmt_offset', '', null ),