summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kolab_sync_data_email.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index 9920276..1625cf6 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -150,7 +150,6 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
foreach ($addresses as $idx => $part) {
// @FIXME: set name + address or address only?
$addresses[$idx] = format_email_recipient($part['mailto'], $part['name']);
- $addresses[$idx] = rcube_charset::clean($addresses[$idx]);
}
$value = implode(',', $addresses);
@@ -169,6 +168,10 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
continue;
}
+ if (is_string($value)) {
+ $value = rcube_charset::clean($value);
+ }
+
$result[$key] = $value;
}
@@ -183,7 +186,7 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
// Use FollowUp flag which is used in Android when message is marked with a star
$result['flag'] = new Syncroton_Model_EmailFlag(array(
'flagType' => 'FollowUp',
- 'status' => Syncroton_Model_EmailFlag::STATUS_ACTIVE,
+ 'status' => Syncroton_Model_EmailFlag::STATUS_ACTIVE,
));
}
@@ -335,7 +338,7 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
foreach ($attachments as $attachment) {
$att = array();
- $filename = $attachment->filename;
+ $filename = rcube_charset::clean($attachment->filename);
if (empty($filename) && $attachment->mimetype == 'text/html') {
$filename = 'HTML Part';
}
@@ -346,10 +349,10 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
$att['estimatedDataSize'] = $attachment->size;
if (!empty($attachment->content_id)) {
- $att['contentId'] = $attachment->content_id;
+ $att['contentId'] = rcube_charset::clean($attachment->content_id);
}
if (!empty($attachment->content_location)) {
- $att['contentLocation'] = $attachment->content_location;
+ $att['contentLocation'] = rcube_charset::clean($attachment->content_location);
}
if (in_array($attachment, $message->inline_parts)) {