1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Check if iconv exists.

This commit is contained in:
Thomas Tanghus 2012-10-25 18:04:57 +02:00
parent 69cdc09d93
commit d5d81b36c7

View File

@ -222,7 +222,9 @@ class VCard {
if($upgrade && in_array($property->name, $stringprops)) {
self::decodeProperty($property);
}
$property->value = str_replace("\r\n", "\n", iconv(mb_detect_encoding($property->value, 'UTF-8, ISO-8859-1'), 'utf-8', $property->value));
if(function_exists('iconv')) {
$property->value = str_replace("\r\n", "\n", iconv(mb_detect_encoding($property->value, 'UTF-8, ISO-8859-1'), 'utf-8', $property->value));
}
if(in_array($property->name, $stringprops)) {
$property->value = strip_tags($property->value);
}