HTML element ID's can be all numeric according to the spec
Reported by
blake1...@gmail.com,
Jun 2 2018
|
|||
Issue descriptionUserAgent: 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.
,
Jun 2 2018
Ah, however, if you change the CSS selector to #\222 it still doesn't work.
,
Jun 2 2018
It should be #\32 22 as you can see in the examples of CSS escaping linked above.
,
Jun 3 2018
,
Jun 3 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by woxxom@gmail.com
, Jun 2 2018