WordPress.org

Make WordPress Core

Ticket #8619: sub_category_w_spaces.diff

File sub_category_w_spaces.diff, 570 bytes (added by filosofo, 5 years ago)
  • wp-includes/query.php

     
    18171817 
    18181818                // Category stuff for nice URLs 
    18191819                if ( '' != $q['category_name'] && !$this->is_singular ) { 
     1820                        $q['category_name'] = sanitize_title($q['category_name']); 
    18201821                        $reqcat = get_category_by_path($q['category_name']); 
    18211822                        $q['category_name'] = str_replace('%2F', '/', urlencode(urldecode($q['category_name']))); 
    18221823                        $cat_paths = '/' . trim($q['category_name'], '/');