Should whitespace be allowed for use as an ID?
See original GitHub issueI haven’t had the chance to check across platforms yet, but I bet that the id
property is allowed to be whitespace across most (all?) platforms. Should it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Should whitespace be allowed for use as an ID? #2748
I haven't had the chance to check across platforms yet, but I bet that the id property is allowed to be whitespace across...
Read more >HTML check: An ID must not contain whitespace
Technically, in HTML5, the value for an id attribute may contain any character, except whitespace characters. However, to avoid inadvertent errors, ...
Read more >Can a DOM element have an ID that contains a space?
Short answer is no. Letters, numbers, underscores, hyphens, periods and colons only. (darn, karim beat me to it.) Share.
Read more >What are some compelling reasons to disallow spaces in ...
Whitespaces will only stripped in the frontend. You'll be able to drop that feature by altering only one frontend application.
Read more >Is it bad practice to have document name with spaces?
No spaces is best practice. Upvote -2
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d say reject all together, and enforce a strict Regex for ids.
Whatever is shipped today is the supported scenario - we can’t break existing customers at this point