mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 10:33:05 +01:00
Properly delimit URLs by \r, \n, \t *or* a space in sanitize_trackback_urls(). Fixes multiple trackback URL usage. props SergeyBiryukov, fixes #21624 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@21718 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2a8af13e3e
commit
667a94907c
@ -3235,7 +3235,7 @@ function sanitize_mime_type( $mime_type ) {
|
||||
* @return string URLs starting with the http or https protocol, separated by a carriage return.
|
||||
*/
|
||||
function sanitize_trackback_urls( $to_ping ) {
|
||||
$urls_to_ping = preg_split( '/\r\n\t /', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY );
|
||||
$urls_to_ping = preg_split( '/[\r\n\t ]/', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY );
|
||||
foreach ( $urls_to_ping as $k => $url ) {
|
||||
if ( !preg_match( '#^https?://.#i', $url ) )
|
||||
unset( $urls_to_ping[$k] );
|
||||
|
Loading…
x
Reference in New Issue
Block a user