W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2009

[whatwg] Plus Signs in Signed Integers

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 18 Jun 2009 15:30:31 -0400
Message-ID: <4A3A95D7.5020202@mit.edu>
Smylers wrote:
>   <ol start=H2SO4>
>     <li>Acid test
>   </ol>
> That should cause parsing an integer to abort and so the default of
> start=1 to be used.  Opera, Links, and W3M get that right.  Konqueror,
> Dillo, and Lynx all also seem to manage the aborting, but use a default
> of zero instead.  Firefox parses the "2" out of "H2SO4"

In Firefox, if the string doesn't "look like an integer" we end up 
calling some code that crazy-permissive string-to-integer parsing (which 
in particular skips over "leading garbage").  We plan to stop doing 
that, for what it's worth.

> seemingly using
> the first integer it can find in the attribute, so possibly isn't
> special-casing "+".

There is no special-casing of '+' in the non-crazy-permissive code, 
correct.  That can be fixed, though.

Received on Thursday, 18 June 2009 12:30:31 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:13 UTC