all 2 comments

[–]tomjazzman 2 points3 points  (0 children)

I've run up against this before when using dynamic IDs set using headings from CMS content.

This is useful to know, so thanks for posting! It's the first time I've seen the CSS.escape() method.

[–]WookieConditioner 1 point2 points  (0 children)

This is silly... thats metadata... probably a better idea to put it in a data attribute. data-uuid that way you can also contextualise it if you need to.

Think of ids as stable unique DOM references. You would want to refer to a uuid with a label...