andreasbm / weightless

High-quality web components with a small footprint
MIT License
378 stars 31 forks source link

wl-radio throws error when name has "." #85

Open brettwillis opened 5 years ago

brettwillis commented 5 years ago

If the name attribute of the wl-radio has a . character, such as name="my.name" (or and character that breaks CSS query) then the radio throws an error:

DOMException: Failed to execute 'querySelectorAll' on 'DocumentFragment': 'wl-radio[name=my.name]:not([disabled])' is not a valid selector.

Perhaps the radio should perform some escaping on the name.