W3C home > Mailing lists > Public > public-html@w3.org > December 2011

[Bug 15047] New: Common microsyntaxes parsing rules allow non-numeric trailing characters

From: <bugzilla@jessica.w3.org>
Date: Fri, 02 Dec 2011 21:33:29 +0000
To: public-html@w3.org
Message-ID: <bug-15047-2495@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15047

           Summary: Common microsyntaxes parsing rules allow non-numeric
                    trailing characters
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: sylvaing@microsoft.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


PROBLEM
-------
The rules defined in section 2.5.4 [1]seem to allow numbers followed by any
non-numeric characters i.e. not only is "41  " valid, but so is "41xyz". Both
evaluate to 41. A value such as "41q20" would also evaluate to 41. 

This is because what follows the collected sequence of numeric character is
never checked.

It is unclear why a sequences of number followed by any non-numeric character
should be valid. 

PROPOSED SOLUTION
-----------------

Once the algorithm is done collecting the last numeric sequence and before
returning a value, it should:

- Skip whitespace
- If position is *not* past the end of input, return an error.


[1] http://www.w3.org/TR/html5/common-microsyntaxes.html#numbers

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Saturday, 3 December 2011 02:08:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:28 UTC