Greetings quicksketch,

I have discovered a bug in webform and I wanted to point it out to you and either request that you fix it, or accept a patch from me to
address the issue. It is very small and I think that it would be easier if you would just add the proposed edit to your code base.

In webform.module, lines 1814 - 1816 read as follows:

< snip >
elseif (drupal_strlen($email_from_name) > 0) {
$froms[$cid] = '"'. mime_header_encode($email_from_name) .'" <'. $email_from_address .'>';
}

Our site name has an ampersand in it... and the "From" address is
reading it as "&amp;"

To correct this, I added a function call to html_entity_decode() on
line 1815 as follows

< snip >
elseif (drupal_strlen($email_from_name) > 0) {
$froms[$cid] = '"'.mime_header_encode(html_entity_decode($email_from_name)) .'" <'.$email_from_address .'>';
}

Please advise how you intend to address this issue, and if I can be
of further assistance in this matter.

Kind Regards,

Jeff

Comments

quicksketch’s picture

Status: Active » Closed (fixed)

This was corrected in the 2.8 version. The problem was actually that the $email_from_name was being encoded to begin with. Rather than encode and then decode it as suggested here, we just don't encode it at all now.