Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I think line 250 of print_mail/print_mail.inc
$from = '"'. $form_state['values']['fld_from_name'] .'" <'. $form_state['values']['fld_from_addr'] .'>';
should look like this
$from = '"'. addslashes(mime_header_encode($form_state['values']['fld_from_name'])) .'" <'. $form_state['values']['fld_from_addr'] .'>';
It fixed a bug for users with non ASCII characters in their names on my website.
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHi,
Can you tell me an example of such a username??
Comment #2
kargal CreditAttribution: kargal commentedSome examples :
Dorothée
Andrée
Laëtitia
Kind of firstnames you don't usually see with an american or english community ;)
Comment #3
jcnventura CreditAttribution: jcnventura commentedWell, my first name is João, so I certainly relate to that.
I think I see what the bug is. :) I'll try to see what I can do.
João
Comment #4
jcnventura CreditAttribution: jcnventura commentedComment #5
jcnventura CreditAttribution: jcnventura commentedThanks for the suggestion.
After reading the documentation, of mime_header_encode(), I concluded that in no occasion would the addslashes() call be needed, so I didn't use that.
Committed to git.