WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12808 closed defect (bug) (fixed)

Remove _self attribute in nav menu links

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

Description

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.

eg:
<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)

comment:1 dancole4 years ago

  • Keywords menus legacy attribute html validation removed

comment:2 nacin4 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.

comment:3 ptahdunbar4 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.

comment:4 nacin4 years ago

Already done, nearing commit.

comment:5 nacin4 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.