Closed pauldwaite closed 5 years ago
Use the show-hide-content.js script with a radio button that has a period in its name attribute, for example:
Click on the radio button that shows the content.
The content is shown.
A JavaScript error is thrown:
Syntax error, unrecognized expression: [data-target] > input[type="radio"][name=choice.yesno][aria-controls] jquery-1.11.3.js:1497
The Scala Play framework’s form mapping feature allows form fields to be mapped to object properties, by putting periods in form field name attributes: https://www.playframework.com/documentation/2.5.x/ScalaForms#Nested-values
As such, it is common for Play web projects to have form fields with periods in their name attributes.
The HTML spec appears to allow name attributes containing periods: https://www.w3.org/TR/html5/forms.html#naming-form-controls:-the-name-attribute
I believe this was addressed by #403 (just need to ship a release to actually get the change out)
Steps to reproduce
Use the show-hide-content.js script with a radio button that has a period in its name attribute, for example:
Click on the radio button that shows the content.
Expected behaviour
The content is shown.
Actual behaviour
A JavaScript error is thrown:
Notes
The Scala Play framework’s form mapping feature allows form fields to be mapped to object properties, by putting periods in form field name attributes: https://www.playframework.com/documentation/2.5.x/ScalaForms#Nested-values
As such, it is common for Play web projects to have form fields with periods in their name attributes.
The HTML spec appears to allow name attributes containing periods: https://www.w3.org/TR/html5/forms.html#naming-form-controls:-the-name-attribute