Doing some validation on the filenames when the form is completed is one way to tackle that issue, but I am sure there are other solutions.
This thread has some useful info on validation - Remove special characters from attachment? - Forms / SharePoint Online - Community