diff --git wp-includes/post.php wp-includes/post.php
index 76fdd65..9944b53 100644
|
|
function &get_post(&$post, $output = OBJECT, $filter = 'raw') { |
381 | 381 | _get_post_ancestors($post); |
382 | 382 | $_post = sanitize_post($post, 'raw'); |
383 | 383 | wp_cache_add($post->ID, $_post, 'posts'); |
| 384 | } elseif ( is_object($post) && 'raw' == $post->filter ) { |
| 385 | $_post = $post; |
384 | 386 | } else { |
385 | 387 | if ( is_object($post) ) |
386 | 388 | $post_id = $post->ID; |
diff --git wp-includes/query.php wp-includes/query.php
index f47a860a..c0a9164 100644
|
|
class WP_Query { |
2745 | 2745 | |
2746 | 2746 | $this->post_count = count($this->posts); |
2747 | 2747 | |
2748 | | // Sanitize before caching so it'll only get done once |
2749 | | for ( $i = 0; $i < $this->post_count; $i++ ) { |
2750 | | $this->posts[$i] = sanitize_post($this->posts[$i], 'raw'); |
| 2748 | // Always sanitize |
| 2749 | foreach ( $this->posts as $i => $post ) { |
| 2750 | $this->posts[$i] = sanitize_post( $post, 'raw' ); |
2751 | 2751 | } |
2752 | 2752 | |
2753 | 2753 | if ( $q['cache_results'] ) |