This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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
The related sections are: 2.5.4.1 Non-negative integers [1] 2.5.4.2 Signed integers [2] 2.5.4.3 Real numbers [3] 2.5.4.4 Percentages and lengths [4] [1] http://www.w3.org/TR/html5/common-microsyntaxes.html#non-negative-integers [2] http://www.w3.org/TR/html5/common-microsyntaxes.html#signed-integers [3] http://www.w3.org/TR/html5/common-microsyntaxes.html#real-numbers [4] http://www.w3.org/TR/html5/common-microsyntaxes.html#percentages-and-dimensions
Isn't it this way because that's how browsers work (interoperably)? I certainly remember <table border="5"> being the same as <table border="5px"> or <table border="5em"> or <table border="5zzz">.
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: no spec change Rationale: The rules don't "allow" numbers; and numbers like "41xyz" aren't "valid". However, the parser does handle those errors by ignoring the invalid trailing content. That's intentional, for back compat reasons.