Make WordPress Core

Opened 12 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:

Description

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

  • Cc me@… added

#2 @SergeyBiryukov
12 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="http://wordpress.org/development/">Development Blog</a></li>
<li><a href="http://codex.wordpress.org/">Documentation</a></li>
<li><a href="http://wordpress.org/extend/plugins/">Plugins</a></li>
<li><a href="http://wordpress.org/extend/ideas/">Suggest Ideas</a></li>
<li><a href="http://wordpress.org/support/">Support Forum</a></li>
<li><a href="http://wordpress.org/extend/themes/">Themes</a></li>
<li><a href="http://planet.wordpress.org/">WordPress Planet</a></li>

In the Target meta box, _none option corresponds to an empty value:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/meta-boxes.php#L779

In _walk_bookmarks(), target attribute is only added if it's not empty:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/bookmark-template.php#L94

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.