Description
This appears to be specific to profile fields that do not have other validations, e.g., regex or lists, etc.
The error appears to happen when you use single or double quote characters in these fields.
Steps to reproduce
- Enter text that includes either a single or double quote into a custom profile field - that does not have another edit defined (no regex).
- This happens when using the standard Location & Skype fields, as well as any new custom field added.

Environment (complete as necessary)
- Version/Git revision: 2.1.3
- Database Type: MySQL
- Database Version: 8.0
- PHP Version: 8.1
Additional information/references
From the forum:
https://www.simplemachines.org/community/index.php?topic=583519.0