W3C home > Mailing lists > Public > www-validator@w3.org > August 2012

Re: Validator bug: Bad character after <

From: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>
Date: Sun, 05 Aug 2012 22:37:08 +0100
Message-ID: <501EE784.8090404@Rhul.Ac.Uk>
To: Назар Мокринський <nazar@mokrynskyi.com>
CC: www-validator@w3.org


Назар Мокринський wrote:
> In my code I have part like this:
>
>     <select>
>          <option value="&lt;">Option</option>
>     </select>
>
> But anyway validator says:
>
>     Bad character after <. Probable cause: Unescaped <. Try escaping it
>     as &lt;.
>
> UTF-8, HTML5

Can't replicate : here is sample code, validated
by direct input.  Unclear why I had to wrap <P>
around the <SELECT> element, but won't validate
without for reasons unrelated to your message.

<!DOCTYPE HTML>
<HTML>
<HEAD>
       <TITLE>My first HTML document</TITLE>
</HEAD>
<BODY>
<form action="#">
<P>
<select>
     <option value="&lt;">Option</option>
</select>
</P>
</form>
</BODY>
</HTML>

Also validates as HTML 4.01 Strict with the appropriate DOCTYPE.

Philip Taylor
Received on Sunday, 5 August 2012 21:37:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 5 August 2012 21:37:46 GMT