FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17656&edit=1

ID: 17656
Updated by: till@php.net
Reported By: sky dot stebnicki at aereus dot com
Summary: New Lines
Status: Open
Type: Bug
Package: File_IMC
Operating System: FreeBSD 8 x64
Package Version: 0.4.1
PHP Version: 5.2.2
-Assigned To:
+Assigned To: till
Roadmap Versions:
New Comment:

-Assigned To:
+Assigned To: till



Previous Comments:
------------------------------------------------------------------------

[2010-08-05 00:23:23] skystebnicki

Description:
------------
When parsing DESCRIPTION of a vcalendar, all new lines which are escaped
with '\n' are converted to 'n' without the backslash which makes it
almost impossible to escape from the client side to get the desired new
line.

Test script:
---------------
$buf = "BEGIN:VCALENDAR
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;CN="Sky A Stebnicki
(sky.stebnicki@aereus.com)";RSVP=TRUE:mailto:s
ky.stebnicki@aereus.com
CLASS:PUBLIC
CREATED:20100804T193456Z
DESCRIPTION:This\n\nIs\n\nMy\n\nNotes\n\nTRE\n
DTEND;TZID="Pacific Standard Time":20100804T113000
DTSTAMP:20100804T193456Z
DTSTART;TZID="Pacific Standard Time":20100804T110000
LAST-MODIFIED:20100804T193456Z
ORGANIZER;CN="Sky Stebnicki":mailto:sky@teamromito.com
PRIORITY:5
SEQUENCE:1
SUMMARY;LANGUAGE=en-us:Test New Line from OL
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR";

$parser = File_IMC::parse('vCalendar');
$arr_evnt = $parser->fromText($buf);
echo $arr_evnt['DESCRIPTION'][0]['value'][0][0];

Expected result:
----------------
This

Is

My

Notes

Tre

Actual result:
--------------
ThisnnIsnnMynnNotesnnTREn

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 20, '10 at 2:52p
activeDec 20, '10 at 2:52p
posts1
users1
websitepear.php.net

1 user in discussion

Till: 1 post

People

Translate

site design / logo © 2022 Grokbase