6.0.0-beta1
7/17/25

[#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 08/05/2013 (4364 days ago)
Due
Updated 01/19/2016 (3467 days ago)
Assigned
Resolved 01/19/2016 (3467 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/19/2016 12:16:50 PM 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.
08/05/2013 04:38:20 PM 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. :)
08/05/2013 02:10:16 PM stefan (at) baer (dot) rwth-aachen (dot) de Comment #1
Priority ⇒ 2. Medium
New Attachment: vcalendar.patch Download
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Wrong line unfolding for VCALENDAR 1.0
Type ⇒ Bug
State ⇒ Unconfirmed
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