Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#12808 closed defect (bug) (fixed)

Remove _self attribute in nav menu links

Reported by: ryanhellyer's profile ryanhellyer Owned by: ptahdunbar's profile ptahdunbar
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords:
Focuses: Cc:


The new menu system in WP 3.0 is adding target attributes to links. These are old legacy attributes and shouldn't be used anymore. It also causes validation errors unless using a transitional doctype.

<a target="_self" href="http://localhost/services/">Services</a>

should be just:
<a href="http://localhost/services/">Services</a>

This bug is present in the latest menu system in trunk. I'm not sure how to find the exact version number to provide here, but it was downloaded today (2nd April 2010).

Hopefully I've filed this bug report correctly. I'm somewhat of a trac n00b :p

Change History (5)

#1 @dancole
14 years ago

  • Keywords menus legacy attribute html validation removed

#2 @nacin
14 years ago

  • Component changed from General to Menus
  • Milestone changed from Unassigned to 3.0
  • Owner set to ryan

Yeah, we allow the option of opening in a new window. But we can omit target="_self" when that option isn't chosen.

#3 @ptahdunbar
14 years ago

  • Owner changed from ryan to ptahdunbar
  • Status changed from new to accepted
  • Summary changed from TARGET attribute in menus for 3.0 to Remove _self attribute in nav menu links

Got it.

#4 @nacin
14 years ago

Already done, nearing commit.

#5 @nacin
14 years ago

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

(In [13974]) Don't use target="_self" in nav menu links, just omit the attribute. Also fix and run earlier db upgrades. fixes #12808

Note: See TracTickets for help on using tickets.