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

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 the QA contact for the bug.

Received on Friday, 2 December 2011 21:33:29 UTC