You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
makeId should prepend an alphabetical character for HTML4 #635
The makeId utility generates a random DOM identifier, which is a mixture of alphanumeric characters. Sometimes this results in an identifier that starts with a number, which is not valid in HTML4 (but is in HTML5). This caused a problem in Cloud when integrating with Recurly, since the latter's code would choke on IDs that started with numbers. We were able to work around this by setting explicit IDs, however it would be nice to avoid this issue more widely by preventing it in makeId.
@pugnascotia I was actually aware of that issue when creating the service in the very first place. I just didn't expect that we have any UIs running, that can't be HTML5 compliant :D But I think we can just prefix every id with a letter i and we should be fine. Will setup a PR for that.
Activity
pugnascotia commentedon Apr 6, 2018
We could do something like:
It feels a bit icky though. I'd be interested to hear @cjcenizal's thoughts.
timroes commentedon Apr 6, 2018
@pugnascotia I was actually aware of that issue when creating the service in the very first place. I just didn't expect that we have any UIs running, that can't be HTML5 compliant :D But I think we can just prefix every id with a letter
iand we should be fine. Will setup a PR for that.chandlerprall commentedon Sep 18, 2020
makeIdhas been deprecated in favour ofhtmlIdGenerator.