From 1f98d935d39c2e407717e0fd8a641926ee3dd2e6 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 1 Apr 2009 11:06:10 +0000 Subject: [PATCH] Put quotes around both encoded and non-encoded addresses for consistency (#2449213) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13493 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/mime/AddressStructure.class.php | 6 +++--- functions/identity.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/class/mime/AddressStructure.class.php b/class/mime/AddressStructure.class.php index 34193eef..956326dc 100644 --- a/class/mime/AddressStructure.class.php +++ b/class/mime/AddressStructure.class.php @@ -67,13 +67,13 @@ class AddressStructure { if ($encoded && !$is_encoded) { $personal_encoded = encodeHeader($personal); if ($personal !== $personal_encoded) { - $personal = $personal_encoded; + $personal = '"' . $personal_encoded . '"'; } else { - $personal = '"'.$this->personal.'"'; + $personal = '"' . $this->personal . '"'; } } else { if (!$is_encoded) { - $personal = '"'.$this->personal.'"'; + $personal = '"' . $this->personal . '"'; } } $addr = ($email ? $personal . ' <' .$email.'>' diff --git a/functions/identity.php b/functions/identity.php index 4f80b0a4..83763dfa 100644 --- a/functions/identity.php +++ b/functions/identity.php @@ -243,9 +243,9 @@ function build_from_header($identity = 0) { if ( isset($from_name) ) { $from_name_encoded = encodeHeader($from_name); if ($from_name_encoded != $from_name) { - return $from_name_encoded .' <'.$from_mail.'>'; + return '"' . $from_name_encoded . '" <' . $from_mail . '>'; } - return '"'.$from_name .'" <'.$from_mail.'>'; + return '"' . $from_name . '" <' . $from_mail . '>'; } return $from_mail; } -- 2.25.1