Automattic / Automattic/jetpack

Contact Form: Encoding issues with reply-to address when special characters are used in name field

Open
#6,528 6 comments 0 reactions 0 assignees View on GitHub
[Feature] Forms [Pri] Normal [Status] Stale Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

When special characters - such as "ä" - are used in the name field of the contact form, there are various issues with the reply-to address in the generated email.

#### Steps to reproduce the issue

1. Create a test Jetpack or WordPress.com that has a Gmail address listed as the admin address.
2. Add a contact form to a new page.
3. Submit a test message to the contact form to confirm that you receive an email at your Gmail account that the reply-to address is the same as the one you entered into the form.
4. Submit another test message to the contact form but, this time, enter a name that contains special characters into the name field, such as "Mänttäri."

#### What I expected

I expected to receive an email containing the second test message I'd submitted to the form and I expected the reply-to address to be the same as the address entered.

#### What happened instead

The second reply-to address was donotreply@wordpress.com. I can confirm that this is the reply-to address used by Gmail whenever a name with special characters - such as "ä" - are used in the name field.

Other email clients generate a reply-to field that looks as follows: "=?UTF-8?Q?\"Miia_M=C3=A4ntt=C3=A4ri\"_?

Reported in 3083282-t

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by reproducing the contact-form submission with a name containing a special character, then trace the generated email's reply-to address; done means the submitted address remains the reply-to address for such names across the described email clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.