I have modified the VocabularyPickerWidget to use FormattersAPI.css_id() to generate its input_id value.
The implementation of css_id has been changed:
1. '.' are considered valid id characters and will no longer be replaced by '-'. This is to allow ids like 'field.foo' to be rendered as is and not changed to 'field-foo'
2. If any invalid characters are found in the id and are replaced by '-', then the base64 encoding of the id name is appended to ensure uniqueness.
Unit tests have been added for css_id (there were none).
The only place that used css_id before this was the +review-licences page for projects. I checked that this page still works as expected.
I have modified the VocabularyPicke rWidget to use FormattersAPI. css_id( ) to generate its input_id value.
The implementation of css_id has been changed:
1. '.' are considered valid id characters and will no longer be replaced by '-'. This is to allow ids like 'field.foo' to be rendered as is and not changed to 'field-foo'
2. If any invalid characters are found in the id and are replaced by '-', then the base64 encoding of the id name is appended to ensure uniqueness.
Unit tests have been added for css_id (there were none).
The only place that used css_id before this was the +review-licences page for projects. I checked that this page still works as expected.