From 6ed53a446106b675c08680bfffebfa65723916a1 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 16 Apr 2009 21:47:42 +0000 Subject: [PATCH] Sanitize when querying against category name so that multiple-word subcategories match. props filosofo. fixes #8619 git-svn-id: https://develop.svn.wordpress.org/trunk@10956 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index 333a760075..1ed55d884e 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1815,6 +1815,7 @@ class WP_Query { // Category stuff for nice URLs if ( '' != $q['category_name'] && !$this->is_singular ) { + $q['category_name'] = sanitize_title($q['category_name']); $reqcat = get_category_by_path($q['category_name']); $q['category_name'] = str_replace('%2F', '/', urlencode(urldecode($q['category_name']))); $cat_paths = '/' . trim($q['category_name'], '/');