WordPress.org

Make WordPress Core

Ticket #8619: sub_category_w_spaces_take_2.8619.diff

File sub_category_w_spaces_take_2.8619.diff, 611 bytes (added by filosofo, 6 years ago)
  • wp-includes/query.php

     
    18111811 
    18121812                // Category stuff for nice URLs 
    18131813                if ( '' != $q['category_name'] && !$this->is_singular ) { 
     1814                        $q['category_name'] = implode('/', array_map('sanitize_title', explode('/', $q['category_name']))); 
    18141815                        $reqcat = get_category_by_path($q['category_name']); 
    18151816                        $q['category_name'] = str_replace('%2F', '/', urlencode(urldecode($q['category_name']))); 
    18161817                        $cat_paths = '/' . trim($q['category_name'], '/');