X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..a6f44f0edcda2471c5a33e4156c1c9488c7f3210:/wp-includes/pluggable.php?ds=sidebyside diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index acfa2ddd..189b88a2 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -942,6 +942,7 @@ if ( !function_exists('wp_validate_redirect') ) : * @return string redirect-sanitized URL **/ function wp_validate_redirect($location, $default = '') { + $location = trim( $location ); // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//' if ( substr($location, 0, 2) == '//' ) $location = 'http:' . $location;