Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24057 closed defect (bug) (worksforme)

wp_list_bookmarks links target=""

Reported by: moscar09's profile moscar09 Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.5.1
Component: General Keywords:
Focuses: Cc:


When adding links via the add links function in WordPress, the default target of the link is _none.

The problem is, the code generated for that code is
<a href="..." target="">, target being an empty string. This is not HTML5 compliant, as target has to have at least 1 character.

Change History (4)

#1 @aniketpant
11 years ago

  • Cc me@… added

#2 @SergeyBiryukov
11 years ago

  • Keywords reporter-feedback added

Could not reproduce neither in 3.5.1 nor in 3.6-beta1.

This is what I see in HTML with the default Links widget:

<li><a href="">Development Blog</a></li>
<li><a href="">Documentation</a></li>
<li><a href="">Plugins</a></li>
<li><a href="">Suggest Ideas</a></li>
<li><a href="">Support Forum</a></li>
<li><a href="">Themes</a></li>
<li><a href="">WordPress Planet</a></li>

In the Target meta box, _none option corresponds to an empty value:

In _walk_bookmarks(), target attribute is only added if it's not empty:

Your theme or some plugin is probably hooking into wp_list_bookmarks filter to change the output.

#3 @iseulde
11 years ago

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

#4 @markoheijnen
11 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.