From ae9ce41d6df68ed6449f296dd8af48590d27157d Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 26 Dec 2008 09:11:52 +0000 Subject: fix bug 1190302 with provided patch --- functions/ical_parser.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'functions') diff --git a/functions/ical_parser.php b/functions/ical_parser.php index e3995a3..23c31c1 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -412,9 +412,11 @@ foreach ($cal_filelist as $cal_key=>$filename) { } break; case 'ATTENDEE': - $field = str_replace("ATTENDEE;CN=", "", $field); - $data = str_replace ("mailto:", "", $data); - $attendee[] = array ('name' => stripslashes($field), 'email' => stripslashes($data)); + $attendee[] = array ('name' => ereg_replace ("ATTENDEE;CN=([^;]*).*", "\\1", $field), + 'email' => ereg_replace (".*mailto:(.*).*", "\\1", $field), + 'RSVP' => ereg_replace (".*RSVP=([^;]*).*", "\\1", $field), + 'PARSTAT' => ereg_replace (".*PARTSTAT=([^;]*).*", "\\1", $field), + 'ROLE' => ereg_replace (".*ROLE=([^;]*).*", "\\1", $field)); break; case 'ORGANIZER': $field = str_replace("ORGANIZER;CN=", "", $field); -- cgit v1.2.3