Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.0

Bug #17656 New Lines
Submitted: 2010-08-05 04:23 UTC
From: skystebnicki Assigned: till
Status: Closed Package: File_IMC (version 0.4.1)
PHP Version: 5.2.2 OS: FreeBSD 8 x64
Roadmaps: 0.4.3    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 26 + 49 = ?

 
 [2010-08-05 04:23 UTC] skystebnicki (Sky Stebnicki)
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

Comments

 [2010-12-20 20:53 UTC] till (Till Klampaeckel)
-Assigned To: +Assigned To: till
 [2011-03-11 22:04 UTC] till (Till Klampaeckel)
-Status: Assigned +Status: Feedback
Getting around to this, I have some questions: 1) Your testscript doesn't work. See how $buf = "...and then there are more quotes inside? I'm not exactly sure how exactly you provided/escaped data. 2) Your $arr_evnt doesn't work either. fromText() returns the entire VCALENDAR array. For more info, see the testcase I committed: http://svn.php.net/viewvc/pear/packages/File_IMC/trunk/tests/File_IMC_BugsTest.php? revision=309116&view=markup If I use your VCALENDAR in single quotes, it works just as expected. Nothing is stripped. I realize it's late, but can you double check this?
 [2011-03-11 22:05 UTC] till (Till Klampaeckel)
Just fyi, the link is broken up, make sure to copy all of it when you check out my test case.
 [2011-03-11 22:38 UTC] till (Till Klampaeckel)
-Status: Feedback +Status: Closed -Roadmap Versions: +Roadmap Versions: 0.4.2
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. This might have been related to #18155.
 [2011-03-12 00:48 UTC] skystebnicki (Sky Stebnicki)
This appears to be working for me now as well. Thank you for the follow-up and the fix!