diff --git a/phpgwapi/inc/horde/Horde/iCalendar.php b/phpgwapi/inc/horde/Horde/iCalendar.php index 58ec6c1002..cf27142374 100644 --- a/phpgwapi/inc/horde/Horde/iCalendar.php +++ b/phpgwapi/inc/horde/Horde/iCalendar.php @@ -799,7 +799,11 @@ class Horde_iCalendar { . $this->_quotedPrintableEncode($value) . $this->_newline; } else { - $attr_string = "$name$params_str:$value"; +# JVL: prevent : for empty values +# $attr_string = "$name$params_str:$value"; + $attr_string = "$name$params_str"; + $attr_string .= (!empty($value)) ? ":$value" : ';'; + $result .= $this->_foldLine($attr_string) . $this->_newline; } } @@ -1120,8 +1124,8 @@ class Horde_iCalendar { while (!empty($line)) { $maxLine = substr($line, 0, 75); $cutPoint = 1+max(is_numeric($p1 = strrpos($maxLine,';')) ? $p1 : -1, - is_numeric($p1 = strrpos($maxLine,':')) ? $p1 : -1, - is_numeric($p1 = strrpos($maxLine,'=')) ? $p1 : -1); + is_numeric($p1 = strrpos($maxLine,':')) ? $p1 : -1, + is_numeric($p1 = strrpos($maxLine,'=')) ? $p1 : -1); if ($cutPoint < 1) // nothing found, then fold complete maxLine $cutPoint = 75; // now fold [0..(cutPoint-1)] @@ -1132,6 +1136,12 @@ class Horde_iCalendar { $line = (strlen($line) <= $cutPoint) ? '' : substr($line, $cutPoint); + + if (strlen($line) < 75) { + $foldedline .= $this->_newline . ' ' . $line; + $line = ''; + } + } return $foldedline; } diff --git a/phpgwapi/inc/horde/XML/WBXML/Decoder.php b/phpgwapi/inc/horde/XML/WBXML/Decoder.php index aeb4aacc48..7eb31df567 100644 --- a/phpgwapi/inc/horde/XML/WBXML/Decoder.php +++ b/phpgwapi/inc/horde/XML/WBXML/Decoder.php @@ -180,7 +180,7 @@ class XML_WBXML_Decoder extends XML_WBXML_ContentHandler { } $this->_attributeDTD = $this->_tagDTD; -print "starting at: ".$this->_strpos."\n"; + while (empty($this->_error) && $this->_strpos < strlen($wbxml)) { $this->_decode($wbxml); }