Ticket #3664 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: m0n5t3r Assigned to: ryan
Priority: normal Milestone: 2.1.1
Component: Administration Version: 2.1
Severity: normal Keywords: has-patch
Cc:

Description

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

wp_list_bookmarks.fix.diff (1.1 kB) - added by m0n5t3r on 01/24/07 21:43:36.
patch to solve #3664

Change History

01/24/07 21:43:36 changed by m0n5t3r

  • attachment wp_list_bookmarks.fix.diff added.

patch to solve #3664

01/24/07 21:47:10 changed by nickshanks

  • keywords set to has-patch.

01/24/07 23:53:23 changed by markjaquith

  • owner changed from anonymous to ryan.

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

01/25/07 00:08:18 changed by Znuff

Also confirmed in SVN, looks like valid.

01/25/07 02:02:25 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

01/25/07 02:02:39 changed by ryan

Committed for 2.1.1 and 2.2.