diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 88c1c23de..7ca64697a 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -272,6 +272,11 @@ class WP { } } + // Convert urldecoded spaces back into + + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) + if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) ) + $this->query_vars[$t->query_var] = str_replace( ' ', '+', $this->query_vars[$t->query_var] ); + // Limit publicly queried post_types to those that are publicly_queryable if ( isset( $this->query_vars['post_type']) ) { $queryable_post_types = get_post_types( array('publicly_queryable' => true) ); @@ -603,4 +608,4 @@ class WP_MatchesMapRegex { } -?> \ No newline at end of file +?> diff --git a/wp-includes/query.php b/wp-includes/query.php index 2f7f20427..e8354592e 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1507,7 +1507,7 @@ class WP_Query { $q[$t->query_var] = wp_basename( $q[$t->query_var] ); } - $term = str_replace( ' ', '+', $q[$t->query_var] ); + $term = $q[$t->query_var]; if ( strpos($term, '+') !== false ) { $terms = preg_split( '/[+]+/', $term );