alphagov / govuk_frontend_toolkit

❗️GOV.UK Frontend Toolkit is deprecated, and will only receive major bug fixes and security patches.
MIT License
403 stars 107 forks source link

Add support to show-hide-content.js for form fields with more varied … #403

Closed paulwaitehomeoffice closed 6 years ago

paulwaitehomeoffice commented 7 years ago

…characters (including periods) in their name attribute.

I’m not sure I added the tests in quite the right way — any advice welcome.

Fixes issue #402 https://github.com/alphagov/govuk_frontend_toolkit/issues/402

adamliptrot-oc commented 6 years ago

Could this issue be fixed by just quoting the name attribute reference? var selector = selectors.radio + '[name="' + escapeElementName($control.attr('name')) + '"][aria-controls]'

adamliptrot-oc commented 6 years ago

This seems good to go?