diff options
author | alecpl <alec@alec.pl> | 2010-10-01 08:08:05 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-10-01 08:08:05 +0000 |
commit | 928bcaedc0013a7b653647750108a8ab2c37d2a6 (patch) | |
tree | 0111916ca098a74f971d8ebf600b6fc63a7e968f /program/include/rcube_vcard.php | |
parent | 249db18585959c9ab3e09b6e91f8fec7cd32e9d0 (diff) |
- Fix handling of Thunderbird's vCards (#1487024)
Diffstat (limited to 'program/include/rcube_vcard.php')
-rw-r--r-- | program/include/rcube_vcard.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/program/include/rcube_vcard.php b/program/include/rcube_vcard.php index 0eb7a780d..9bbc32b3c 100644 --- a/program/include/rcube_vcard.php +++ b/program/include/rcube_vcard.php @@ -218,7 +218,9 @@ class rcube_vcard if ($in_vcard_block && !empty($line)) $vcard_block .= $line . "\n"; - if (trim($line) == 'END:VCARD') { + $line = trim($line); + + if (preg_match('/^END:VCARD$/i', $line)) { // parse vcard $obj = new rcube_vcard(self::cleanup($vcard_block), $charset); if (!empty($obj->displayname)) @@ -226,7 +228,7 @@ class rcube_vcard $in_vcard_block = false; } - else if (trim($line) == 'BEGIN:VCARD') { + else if (preg_match('/^BEGIN:VCARD$/i', $line)) { $vcard_block = $line . "\n"; $in_vcard_block = true; } |