W3C home > Mailing lists > Public > www-validator@w3.org > May 2014

Re: Experimental html5 validator bug?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 20 May 2014 19:47:49 +0300
Message-ID: <537B8735.70307@cs.tut.fi>
To: Piotr Halama <halamix2@o2.pl>, www-validator@w3.org
2014-05-19 23:08, Piotr Halama wrote:

> I was checking this website
> <http://theirupb.byethost24.com/upb/viewtopic.php?id=1&t_id=1> (I know
> that code is horrible, but it is not imoprtant in this case)

It has 39 Errors and 3 warnings reported. In general, it helps to work 
out the problems sequentially, fixing all the errors you can handle, 
before addressing the tough parts. Quite often, fixing a simple error 
removes some cryptic errors as a side effect.

In this case, however, the problem is rather local:

> Experimental html5 validator should accept target="_blank" , but it display:
> /Line 77, Column 128/: No space between attributes.
>
> |…ofile.php?action=get&amp;id=1 target='*_*blank'><strong>Halamix2</strong></a> on…|

Line 77 in its entirety is

<div class='post_edited' name='edit1-1-1' id='edit1-1-1'>Last edited by: 
<a href='profile.php?action=get&amp;id=1 
target='_blank'><strong>Halamix2</strong></a> on May 19, 2014 7:41:06 
pm</div>

The problem is that the href attribute value, in the <a ...> tag, has an 
opening single quote (') but no closing quote. Technically, this means 
that the first quote in target='_blank' is taken as ending the href 
value. This means that the data after it, _blank, is interpreted as 
starting the next attribute specification. This causes the syntax error, 
due to lack of whitespace between attribute specifications.

The fix is to add the closing quote:

<div class='post_edited' name='edit1-1-1' id='edit1-1-1'>Last edited by: 
<a href='profile.php?action=get&amp;id=1' 
target='_blank'><strong>Halamix2</strong></a> on May 19, 2014 7:41:06 
pm</div>

Yucca
Received on Tuesday, 20 May 2014 16:48:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:11 UTC