New issue
Advanced search Search tips

Issue 849006 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

HTML element ID's can be all numeric according to the spec

Reported by blake1...@gmail.com, Jun 2 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce the problem:
1. Load test4.html
2. 
3. 

What is the expected behavior?
AAA in red
AAA in blue

What went wrong?
AAA in red
AAA no color

Did this work before? No 

Does this work in other browsers? No
 Chrome doesn't work if a tag's ID is all numeric.  The current HTML spec states:  "IDs can consist of just digits, start with a digit, start with an underscore, consist of just punctuation, etc."

See:  https://www.w3.org/TR/html5/dom.html#element-attrdef-global-id

Chrome version: 67.0.3396.62  Channel: stable
OS Version: 17.3
Flash Version: Shockwave Flash 29.0 r0

This is a problem because I sometimes use a UUID as an element ID in order to avoid global issues.  When the UUID starts with a number, it doesn't work.
 
test4.html
372 bytes View Download

Comment 1 by woxxom@gmail.com, Jun 2 2018

HTML specification is not applicable to CSS selectors. This is working correctly as per the CSS specification: an all-numeric id should be escaped, see https://www.w3.org/International/questions/qa-escapes#css_identifiers
Ah, however, if you change the CSS selector to #\222 it still doesn't work.

Comment 3 Deleted

Comment 4 by woxxom@gmail.com, Jun 2 2018

It should be #\32 22 as you can see in the examples of CSS escaping linked above.

Labels: Needs-Triage-M67

Comment 6 by tkent@chromium.org, Jun 3 2018

Components: -Blink>HTML Blink>CSS
Status: WontFix (was: Unconfirmed)

Sign in to add a comment