Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#10761 closed defect (bug) (fixed)

Extra Space in Category List

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

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
17 years ago

  • Keywords needs-testing added
  • Milestone Unassigned → 3.0

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

$chain .= $name.$separator;

#2 @dd32
17 years ago

  • Resolution → fixed
  • Status new → 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.