TACC / Core-CMS-Custom

Customized Core CMS code and builds
5 stars 0 forks source link

Hotfix/update reg form for form validation #210

Closed sophia-massie closed 12 months ago

sophia-massie commented 12 months ago

Overview

This addresses the issue on prod that displays the pattern attribute for a telephone number input for an added contact

Related

Changes

The checkForBlankInputs javascript was changed using whitelist methods to allow characters in input. At the same time, the script blacklists some explicit scripting character patterns. The innerHTML was causing some of the regrex escape characters to not be read correctly. Adjusted the use of the script within the add contact button's script.

Testing

  1. Go to http://localhost:8000/register/request-to-submit/
  2. Fill out form and add a contact
  3. Try to input javascript.exe, anything in "quotes" or 'quotes" { hello.exe } thisshouldwork@test.com into any field into a contact name field and make sure invalid characters are removed