Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision )
+++ wp-includes/functions.php	(working copy)
@@ -1333,7 +1333,7 @@ function wp_get_referer() {
 	else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )
 		$ref = $_SERVER['HTTP_REFERER'];
 
-	if ( $ref && $ref !== $_SERVER['REQUEST_URI'] )
+	if ( $ref && parse_url( $ref, PHP_URL_PATH ) !== $_SERVER['REQUEST_URI'] )
 		return $ref;
 	return false;
 }
