mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
replace "=0D=0A" (\r\n) with a simple "\n" in vards during import
This commit is contained in:
parent
cd06ab6e6e
commit
6369935e7c
@ -63,13 +63,13 @@ foreach($lines as $line){
|
||||
if(strtoupper(trim($line)) == 'BEGIN:VCARD'){
|
||||
$inelement = true;
|
||||
} elseif (strtoupper(trim($line)) == 'END:VCARD') {
|
||||
$card[] = iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line);
|
||||
$card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line));
|
||||
$parts[] = implode($nl, $card);
|
||||
$card = array();
|
||||
$inelement = false;
|
||||
}
|
||||
if ($inelement === true && trim($line) != '') {
|
||||
$card[] = iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line);
|
||||
$card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line));
|
||||
}
|
||||
}
|
||||
//import the contacts
|
||||
|
Loading…
Reference in New Issue
Block a user