WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#10761 closed defect (bug) (fixed)

Extra Space in Category List

Reported by: junquan Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.8.4
Component: Formatting Keywords: needs-testing
Focuses: Cc:

Description

Line 211 in category-template.php (get_the_category_list() function) is:
$thelist .= $separator . ' ';
The line should instead be:
$thelist .= $separator . '';

When calling the_category(', '), the space is already manually included in current themes, creating a double space ', ' between category names. This usually is not noticed since HTML automatically reduces the double space down to a single.

However, a problem arises if you don't want any space, since calling the_category(',') will result in ', ' still being used as the delimiter.

Change History (2)

#1 @miqrogroove
10 years ago

  • Keywords needs-testing added
  • Milestone changed from Unassigned to 3.0

+1 get_the_category_list() should match get_category_parents() behavior:

$chain .= $name.$separator;

#2 @dd32
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13943]) Match the separator style of get_category_parents() in get_the_category_list(), Respects the spacing of the provided separator. Fixes #10761

Note: See TracTickets for help on using tickets.