Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3664 closed defect (bug) (fixed)

wp_list_bookmarks doesn't behave as advertised in the documentation, generates invalid XHTML

Reported by: m0n5t3r's profile m0n5t3r Owned by: ryan's profile ryan
Milestone: 2.1.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: has-patch
Focuses: Cc:


According to the codex documentation, when an empty title_li parameter is passed to wp_list_bookmarks, the function should dump the bookmarks as a series of <li> tags not wrapped in <ul></ul>, which is a reasonable behaviour; however, this isn't the case in reality;

the attached patch solves the issue, and also addresses another "feature": when outputting a single category, the <li> tag that surrounds it has the id "linkuncat"; when several link categories are dumped separately, this leads to invalid HTML (several tags with the same id)

Attachments (1)

wp_list_bookmarks.fix.diff (1.1 KB) - added by m0n5t3r 17 years ago.
patch to solve #3664

Download all attachments as: .zip

Change History (6)

17 years ago

patch to solve #3664

#1 @nickshanks
17 years ago

  • Keywords has-patch added

#2 @markjaquith
17 years ago

  • Owner changed from anonymous to ryan

Ryan's territory. Agree with 2.1.1 milestone, however, if valid.

#3 @Znuff
17 years ago

Also confirmed in SVN, looks like valid.

#4 @ryan
17 years ago

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

(In [4800]) Don't output ul when title_li is empty. Props m0n5t3r. fixes #3664

#5 @ryan
17 years ago

Committed for 2.1.1 and 2.2.

Note: See TracTickets for help on using tickets.