From d30a6548546fdf4341f2cf047e285b23a823c496 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Tue, 7 Oct 2008 08:56:21 +0000 Subject: [PATCH] Don't run full address thru htmlspecialchars when it gets urlencoded anyway; compose.php doesn't expect it. Thanks to Scott Haneda for reporting. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13297 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/util_addressbook.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/templates/util_addressbook.php b/templates/util_addressbook.php index 92c1b2fe..5ff5f420 100644 --- a/templates/util_addressbook.php +++ b/templates/util_addressbook.php @@ -21,7 +21,7 @@ */ function composeLink ($row) { return makeComposeLink('src/compose.php?send_to=' . - rawurlencode($row['FullAddress']), + rawurlencode($row['RawFullAddress']), htmlspecialchars($row['Email'])); } @@ -41,16 +41,17 @@ function formatAddressList ($addresses) { $contacts = array(); while(list($undef,$row) = each($addresses)) { $contact = array ( - 'FirstName' => htmlspecialchars($row['firstname']), - 'LastName' => htmlspecialchars($row['lastname']), - 'FullName' => htmlspecialchars($row['name']), - 'NickName' => htmlspecialchars($row['nickname']), - 'Email' => htmlspecialchars($row['email']), - 'FullAddress' => htmlspecialchars(AddressBook::full_address($row)), - 'Info' => htmlspecialchars($row['label']), - 'Extra' => (isset($row['extra']) ? $row['extra'] : NULL), - 'Source' => htmlspecialchars($row['source']), - 'JSEmail' => htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES), + 'FirstName' => htmlspecialchars($row['firstname']), + 'LastName' => htmlspecialchars($row['lastname']), + 'FullName' => htmlspecialchars($row['name']), + 'NickName' => htmlspecialchars($row['nickname']), + 'Email' => htmlspecialchars($row['email']), + 'FullAddress' => htmlspecialchars(AddressBook::full_address($row)), + 'RawFullAddress' => AddressBook::full_address($row), + 'Info' => htmlspecialchars($row['label']), + 'Extra' => (isset($row['extra']) ? $row['extra'] : NULL), + 'Source' => htmlspecialchars($row['source']), + 'JSEmail' => htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES), ); $contacts[] = $contact; } -- 2.25.1