nielsonm236 / NetMod-ServerApp

Reprogramming the Web_Relay_Con V2.0 HW-584 Network Module
72 stars 23 forks source link

Bug: Pattern filter not working correctly for Name entry field #220

Closed nielsonm236 closed 3 months ago

nielsonm236 commented 8 months ago

The HTML "pattern" statement is not working correctly to filter out special characters in the Name field. If the title instructions are followed everything works properly, but if "not allowed" special characters are used the filter does not reject them, and URL encoded sequences are inserted for the special characters. I have a solution prepared and will release it with the next general release.

FYI, solutions suggested on Stack Overflow (principally making the hypen or dash character first or last in the custom character definition) do not seem to work ... not sure why, so: pattern='[0-9a-zA-Z*.-]{1,15}' doesn't work pattern='[0-9a-zA-Z.-]{1,15}' doesn't work pattern='[-0-9a-zA-Z_.]{1,15}' doesn't work pattern='[\w*.-]{1,15}' does work I will fix it.

nielsonm236 commented 3 months ago

Addressed in release 20240612 0226