replace "=0D=0A" (\r\n) with a simple "\n" in vards during import
This commit is contained in:
parent
18d19b022f
commit
1d493a70e7
|
@ -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