* CalDAV/Calendar/InfoLog: do NOT use ENCODING=QUOTED-PRINTABLE for iCal 2.0, cuts eg. description off in TB, if containing non-ascii chars

This commit is contained in:
Ralf Becker 2015-07-23 15:51:45 +00:00
parent 56d869dc4b
commit f2ae5a5f3c
2 changed files with 4 additions and 5 deletions

View File

@ -987,8 +987,8 @@ class calendar_ical extends calendar_boupdate
translation::charset(),$charset);
$content = $valueData . implode(';', $valuesData);
if (preg_match('/[^\x20-\x7F]/', $content) ||
($paramData['CN'] && preg_match('/[^\x20-\x7F]/', $paramData['CN'])))
if ($version == '1.0' && (preg_match('/[^\x20-\x7F]/', $content) ||
($paramData['CN'] && preg_match('/[^\x20-\x7F]/', $paramData['CN']))))
{
$paramData['CHARSET'] = $charset;
switch ($this->productManufacturer)
@ -998,7 +998,6 @@ class calendar_ical extends calendar_boupdate
{
$paramData['ENCODING'] = 'QUOTED-PRINTABLE';
}
/* disable automatic QP encoding eg. for new-lines as it also encodes non-ascii/utf-8 which TB does NOT decode
else
{
$paramData['CHARSET'] = '';
@ -1010,7 +1009,7 @@ class calendar_ical extends calendar_boupdate
{
$paramData['ENCODING'] = '';
}
}*/
}
break;
case 'funambol':
$paramData['ENCODING'] = 'FUNAMBOL-QP';

View File

@ -281,7 +281,7 @@ class infolog_ical extends infolog_bo
$options = array();
}
if (preg_match('/[^\x20-\x7F]/', $value))
if ($_version == '1.0' && preg_match('/[^\x20-\x7F]/', $value))
{
$options['CHARSET'] = $charset;
switch ($this->productManufacturer)