Skip to content

Notifications: Email-Fields not properly stripped of hidden characters #2662

@mnlmaier

Description

@mnlmaier

Describe the bug

Hi,

there's an issue which some of our clients stumble upon quite regularly. When copy-pasting an Email-Adress from somewhere (probably MS Office or something similar), sometimes some leftover hidden characters will be included in the email string.

This triggers an error when sending mail notifications, which of course is correct.

Image Image

Would it be possible to add sanitation / hidden character removal to the email fields? I've tested the from and replyTo fields, but I'm not sure if the sanitation should happen somewhere else, too.

Another approach would be to give the user a hint if the address is not RFC compliant.

Thanks!

Steps to reproduce

  1. Use an Email which includes hidden characters (e.g. test.​email@​test-client.​de)
  2. Try to trigger or preview an email notification

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Craft CMS version

Craft Pro 5.8.17

Plugin version

3.1.3

Multi-site?

Yes

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions