From: stekkel Date: Sat, 28 Jun 2003 15:34:00 +0000 (+0000) Subject: handle escaped quotes again X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=da1e42a179d885b3c36c54a1d415b50474a1343a;p=squirrelmail.git handle escaped quotes again git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5140 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index ea8ba293..1eeb38e3 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -774,6 +774,18 @@ function parseAddress($address, $max=0) { break; case '"': $iEnd = strpos($address,$cChar,$i+1); + if ($iEnd) { + // skip escaped quotes + $prev_char = $address{$iEnd-1}; + while ($prev_char === '\\' && substr($address,$iEnd-2,2) !== '\\\\') { + $iEnd = strpos($address,$cChar,$iEnd+1); + if ($iEnd) { + $prev_char = $address{$iEnd-1}; + } else { + $prev_char = false; + } + } + } if (!$iEnd) { $sToken = substr($address,$i); $i = $iCnt;