Hey CF7 Dev.. great work on an amazing plugin. I have a bug to report about using HTML Emails in contact form and when someone submits a form with a name like “O’Connor”. Here’s the deal.
I have a form with the “Use HTML Content type” for Mail 2 checked off. It’s supposed to send a receipt to [first-name] [last-name] <[email]> which normally works swimmingly.
However, if someone uses an apostrophe in the text input for [last-name] the form successfully sends and tells the user it went through but it breaks the recipient address on the server and i get an error in the server log with these headers I removed the persons email address:
Received: by hachiman.dreamhost.com (Postfix, from userid 11422696) id BEB287089B; Mon, 15 Aug 2011 19:04:53 -0700 (PDT) To: Corinne@hachiman.dreamhost.com, O’@hachiman.dreamhost.com;Connor <firstname.lastname@example.org> Subject: Free Class Signup Confirmation Date: Tue, 16 Aug 2011 02:04:53 +0000
It looks like the ‘ in O’Connor must be getting sent as the HTML Entity ’ and it splits it up into three recipients, “Corrine”, “0’” and “Connor <email@example.com>”
To circumvent this rare occurrance (most people don’t have hyphenated names). I’m changing my send to line from [first-name] [last-name] <[email]> to just [email]. I’d rather use the former so that the customer service dept that receives the email can see the person’s name in the preview of the email instead of as HTML in the body of the email.
My other question is… will WordPress make anything that’s not a letter an HTML entity? Including “-” for hyphenated last names?
- The topic ‘HTML Email breaks when someone has name with an apostrophe’ is closed to new replies.