summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-01 12:49:37 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-01 12:49:37 +0200
commitfcb7d4fc034335d960917abd37254bd3997cf2f3 (patch)
treedbd65826f37ad7dc17b3a4ff0dcec66cb4f1feaa /program/lib/Roundcube
parent9453257baf8934cd7667c30d92450689c9a0ded8 (diff)
Fix various iCloud vCard issues, added fallback for external photos (#1489993)
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/html.php2
-rw-r--r--program/lib/Roundcube/rcube_vcard.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php
index bcf89d7df..f18cad0bf 100644
--- a/program/lib/Roundcube/html.php
+++ b/program/lib/Roundcube/html.php
@@ -153,7 +153,7 @@ class html
$attr = array('src' => $attr);
}
return self::tag('img', $attr + array('alt' => ''), null, array_merge(self::$common_attrib,
- array('src','alt','width','height','border','usemap','onclick')));
+ array('src','alt','width','height','border','usemap','onclick','onerror')));
}
/**
diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php
index 4a2684f10..96add110f 100644
--- a/program/lib/Roundcube/rcube_vcard.php
+++ b/program/lib/Roundcube/rcube_vcard.php
@@ -110,7 +110,7 @@ class rcube_vcard
public function load($vcard, $charset = RCUBE_CHARSET, $detect = false)
{
self::$values_decoded = false;
- $this->raw = self::vcard_decode($vcard);
+ $this->raw = self::vcard_decode(self::cleanup($vcard));
// resolve charset parameters
if ($charset == null) {
@@ -496,7 +496,7 @@ class rcube_vcard
if (preg_match('/^END:VCARD$/i', $line)) {
// parse vcard
- $obj = new rcube_vcard(self::cleanup($vcard_block), $charset, true, self::$fieldmap);
+ $obj = new rcube_vcard($vcard_block, $charset, true, self::$fieldmap);
// FN and N is required by vCard format (RFC 2426)
// on import we can be less restrictive, let's addressbook decide
if (!empty($obj->displayname) || !empty($obj->surname) || !empty($obj->firstname) || !empty($obj->email)) {
@@ -532,9 +532,9 @@ class rcube_vcard
// Cleanup
$vcard = preg_replace(array(
// convert special types (like Skype) to normal type='skype' classes with this simple regex ;)
- '/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w-() ]*)(?:>!\$_)?./s',
- '/^item\d*\.X-AB.*$/m', // remove cruft like item1.X-AB*
- '/^item\d*\./m', // remove item1.ADR instead of ADR
+ '/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w-() ]*)(?:>!\$_)?./si',
+ '/^item\d*\.X-AB.*$/mi', // remove cruft like item1.X-AB*
+ '/^item\d*\./mi', // remove item1.ADR instead of ADR
'/\n+/', // remove empty lines
'/^(N:[^;\R]*)$/m', // if N doesn't have any semicolons, add some
),