Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#9194 closed feature request (wontfix)

Support XHTML 1.0 Strict DTD by Changing code from Target="_blank" -TO- onclick="window.open(this.href); return false;"

Reported by: Kenv Owned by:
Milestone: Priority: lowest
Severity: trivial Version: 2.7
Component: Validation Keywords: needs-patch 2nd-opinion
Focuses: Cc:


Any time I direct visitors to content that is not on my site I attempt to always utilize the Target="_blank" which is total appropriate since I use Transitional DTD.

WordPress 2.7.1 creates:


Admin > links > edit/add new > Target > _blank/_top/none

selecting Target _blank creates a depreciated attribute of target="_blank" under the "Strict" DTD

Strict DTD requires:
<a href="another_page.html" onclick="window.open(this.href); return false;" title="Another page new">Open in new window!</a>

W3C validation:
Line 340, Column 107: there is no attribute "target".

…ometics replicated web site." target="_blank">Biometics™ Info</a></li>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

Change History (7)

comment:1 @DD327 years ago

  • Keywords needs-patch 2nd-opinion added; Target= _blank removed
  • Milestone changed from 2.8 to 2.9
  • Summary changed from Change code from Target="_blank" -TO- onclick="window.open(this.href); return false;" to Support XHTML 1.0 Strict DTD by Changing code from Target="_blank" -TO- onclick="window.open(this.href); return false;"
  • Type changed from defect (bug) to feature request

Feature Request: To support the XHTML 1.0 Strict DTD

I'm moving to 2.9 for later consideration, I dont see this going into 2.8 (or for that matter, at all in the near future) - simply for the fact of replacing valid markup(in more common DTD's) with JavaScript which shouldnt really be needed.

However, To achieve this sort of thing, You'd be wanting to add a filter on the output of the image functions, If theres not already one, adding one to allow this should be possible, I'm not sure if there is one, and i'd not know where to look right now. However, I'm going to say that i doubt many other WP functions would pass Validation with the Strict DTD.

comment:2 @Denis-de-Bernardy6 years ago

see also #6049 on using _new

comment:3 @hakre6 years ago

-1 for adding javascript.

comment:4 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.9 to Future Release
  • Priority changed from normal to lowest
  • Severity changed from normal to trivial

same. it's like... I couldn't care less if the WP admin interface won't validate. as long as it works without bugs, I'll be happy. itching to close as wontfix.

comment:5 @hakre6 years ago

well there is one argument for having it validating: quality control. lets say we get the interface to validate (we can get it to validate even with target="_blank" i will do that patch) then everytime it does not validate, i as a delveopler can see that i actually did make a mistake.

so therefore it is quite wise to achieve validity as an easy way to test things on the fly.

comment:6 @hakre6 years ago

Sorry, I got that wrong. The APC is transitional, not strict, therefore there is nothing to patch. +1 for just closing, this is for Blog-Theme I think, so even invalid.

comment:7 @Denis-de-Bernardy6 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.