summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_mime.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-01-24 12:36:48 +0100
committerAleksander Machniak <alec@alec.pl>2014-01-24 12:36:48 +0100
commit5140c310645b1728f59e27d8f5fe37aeb2928d6f (patch)
treeb32f4fcd7270ee8d2c4700e58d5772ecccc4ba82 /program/lib/Roundcube/rcube_mime.php
parentc0dda0556c5e880f4a180cc1c13bb54c61b01c5a (diff)
Remove quotes around addressee name in case they are encoded.
Some clients encode quotes with name using base64/quoted-printable encoding. Quotes were removed only for unencoded strings. Now also encoded names are handled this way. So, recipient/sender strings are displayed without quotes around and e.g. saving to addressbook does not save these redundant quotes.
Diffstat (limited to 'program/lib/Roundcube/rcube_mime.php')
-rw-r--r--program/lib/Roundcube/rcube_mime.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index a931c27c1..55b70f67c 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -378,6 +378,10 @@ class rcube_mime
}
if ($decode) {
$name = self::decode_header($name, $fallback);
+ // some clients encode addressee name with quotes around it
+ if ($name[0] == '"' && $name[strlen($name)-1] == '"') {
+ $name = substr($name, 1, -1);
+ }
}
}