W3C home > Mailing lists > Public > www-validator@w3.org > June 2004

Re: target in xhtml11

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 15 Jun 2004 23:57:27 +0300 (EEST)
To: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0406152352030.1699@korppi.cs.tut.fi>

On Tue, 15 Jun 2004, Nick Kew wrote:

> > <a href="chicken.html" onclick="this.target='_black'"> ... </a>
>
> Doesn't that onclick usage risk buggering up back buttons/etc?

Not on conforming browsers, since browsers should ignore a target value of
'_black'. :-) Well, it's in the HTML specification only, but it's natural
to expect that similar rules apply in the JavaScript side.

The HTML spec specifies a small set of target values that begin with the
underline character "_" and tells that authors may use other values, which
start with a letter, and then says that browsers should ignore other
values. Browsers are known to violate this, but a target value of
'_black' is still unsafe ('black' would be OK).

However a validator cannot possibly check this, since there is no way in a
DTD to specify such a constraint - the target attribute is declared as
having a CDATA value, i.e. any string passes validation.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 15 June 2004 16:57:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:14 GMT