diff --git wp-includes/post.php wp-includes/post.php
index 76fdd65..9944b53 100644
--- wp-includes/post.php
+++ wp-includes/post.php
@@ -381,6 +381,8 @@ function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
 		_get_post_ancestors($post);
 		$_post = sanitize_post($post, 'raw');
 		wp_cache_add($post->ID, $_post, 'posts');
+	} elseif ( is_object($post) && 'raw' == $post->filter ) {
+		$_post = $post;
 	} else {
 		if ( is_object($post) )
 			$post_id = $post->ID;
diff --git wp-includes/query.php wp-includes/query.php
index f47a860a..c0a9164 100644
--- wp-includes/query.php
+++ wp-includes/query.php
@@ -2745,9 +2745,9 @@ class WP_Query {
 
 		$this->post_count = count($this->posts);
 
-		// Sanitize before caching so it'll only get done once
-		for ( $i = 0; $i < $this->post_count; $i++ ) {
-			$this->posts[$i] = sanitize_post($this->posts[$i], 'raw');
+		// Always sanitize
+		foreach ( $this->posts as $i => $post ) {
+			$this->posts[$i] = sanitize_post( $post, 'raw' );
 		}
 
 		if ( $q['cache_results'] )
