6.0.0-git
2019-04-21

[#12535] Wrong line unfolding for VCALENDAR 1.0
Summary Wrong line unfolding for VCALENDAR 1.0
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester stefan (at) baer (dot) rwth-aachen (dot) de
Created 2013-08-05 (2085 days ago)
Due
Updated 2016-01-19 (1188 days ago)
Assigned
Resolved 2016-01-19 (1188 days ago)
Milestone
Patch No

History
2016-01-19 12:16:50 Jan Schneider Comment #3
State ⇒ Not A Bug
Reply to this comment
vCalendar 1.0 is broken by design. As you can see from the example 
next to the standard text that you cited, this would happen:

DESCRIPTION:This is a very long description
   that exists on a long line.

would be unfolded by replacing the linebreak and the following 
whitespace with this whitespace:

DESCRIPTION:This is a very long description  that exists on a long line.

You would end up with a double space between "description" and "that".

It has been proved to be the widest compatibility to simply follow the 
iCalendar 2.0 rules, which would also fix the example from the 
vCalendar 1.0 standard.
2013-08-05 16:38:20 stefan (at) baer (dot) rwth-aachen (dot) de Comment #2 Reply to this comment
The provided patch doesn't seem to be correct. It messes up a lot of 
events when doing a SyncML sync.

Sorry, can't provide a better patch for this. Looking forward to a 
real fix from the Horde team. :)
2013-08-05 14:10:16 stefan (at) baer (dot) rwth-aachen (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Wrong line unfolding for VCALENDAR 1.0
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
New Attachment: vcalendar.patch Download
Reply to this comment
Unfolding folded lines is done via
$vCal = preg_replace('/[\r\n]+[ \t]/', '', $vCal);

This is the correct behavior for VCALENDAR 2.0. It is however not 
correct for VCALENDAR 1.0:

http://www.imc.org/pdi/vcal-10.rtf

"Unfolding is accomplished by regarding CRLF immediately followed by a 
LWSP-char as equivalent to the LWSP-char."

So the \r\n_ (_ meaning whitespace) must be replaced by _ and not with 
nothing for vcal1.0.

A patch is provided as attachment.

It is possible that exporting vcal1.0 uses the same false assumption. 
I didn't check this.

Saved Queries