mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-11 04:43:52 -04:00
We’ve had whitespace-in-emails problems on: - register form - sign in form - send one off form We should just handle whitespace gracefully, by ignoring it. Makes sense to do this at a global level because there might be other places it’s causing problems that we don’t know about. The only place that users _might_ be relying on leading/trailing spaces (and we have no way of knowing this) is in passwords or tokens. So this filter ignores any instances of `PasswordField`. Adapted from @pcraig3’s work on Digital Marketplace: -4b06f5cfb7-e761c1ce65