]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/pluggable.php
WordPress 3.6.1
[autoinstalls/wordpress.git] / wp-includes / pluggable.php
index acfa2ddd77ac61cfd67ba2fbe2761e9d4b9a6984..189b88a299c8d1d6c226f8a70ccbfc70aa9a3bc1 100644 (file)
@@ -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;