WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
HTML Email breaks when someone has name with an apostrophe (3 posts)

  1. thetrickster
    Member
    Posted 2 years ago #

    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&#8217@hachiman.dreamhost.com;Connor <private.email@gmail.com>
    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 &#8217 and it splits it up into three recipients, "Corrine", "0&#8217" and "Connor <private.email@gmail.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?

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for reporting this. I confirmed that the current version has a bug that causes this kind of issue when you use HTML mail. It will be fixed in the next release.

  3. goodevil
    Member
    Posted 2 years ago #

    Hello!

    I want to confirm: has this apostrophe in the email address bug been fixed with the current release?

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic