From 85bec38507b1e2a4b35c8b2cc308c95bd1f44fd5 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 5 Sep 2007 03:11:04 +0000 Subject: [PATCH] Don't skip sanitization if 404. Add wp_title display filters. git-svn-id: https://develop.svn.wordpress.org/trunk@6035 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/default-filters.php | 2 +- wp-includes/query.php | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 2cc7840051..5fba632ef4 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -49,7 +49,7 @@ foreach ( $filters as $filter ) { // Format strings for display. $filters = array('comment_author', 'term_name', 'term_description', 'link_name', 'link_description', - 'link_notes', 'bloginfo'); + 'link_notes', 'bloginfo', 'wp_title'); foreach ( $filters as $filter ) { add_filter($filter, 'wptexturize'); add_filter($filter, 'convert_chars'); diff --git a/wp-includes/query.php b/wp-includes/query.php index 64b2d7c313..f4547c6abd 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -443,18 +443,8 @@ class WP_Query { $this->query_vars = $this->fill_query_vars($this->query_vars); $qv = &$this->query_vars; - if ( ! empty($qv['robots']) ) { + if ( ! empty($qv['robots']) ) $this->is_robots = true; - return; - } - - if ('404' == $qv['error']) { - $this->is_404 = true; - if ( !empty($query) ) { - do_action_ref_array('parse_query', array(&$this)); - } - return; - } $qv['p'] = (int) $qv['p']; $qv['page_id'] = (int) $qv['page_id']; @@ -709,6 +699,9 @@ class WP_Query { $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment; // Done correcting is_* for page_on_front and page_for_posts + if ('404' == $qv['error']) + $this->set_404(); + if ( !empty($query) ) do_action_ref_array('parse_query', array(&$this)); }