diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2009-01-26 03:51:52 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2009-01-26 03:51:52 +0000 |
commit | 46a025425efdd8f196d17465308f108d8f01992f (patch) | |
tree | ce44185de16517170067d763f858699d389180b9 /functions | |
parent | 9c1ad1c80dbdf3cfa73477437c33fb821a0424b8 (diff) | |
download | phpicalendar-46a025425efdd8f196d17465308f108d8f01992f.tar.gz phpicalendar-46a025425efdd8f196d17465308f108d8f01992f.tar.bz2 phpicalendar-46a025425efdd8f196d17465308f108d8f01992f.zip |
fix multiline descriptions
Diffstat (limited to 'functions')
-rw-r--r-- | functions/ical_parser.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 3776e55..ad4ed81 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -125,6 +125,7 @@ foreach ($cal_filelist as $cal_key=>$filename) { $nextline = fgets($ifile, 1024); $nextline = ereg_replace("[\r\n]", "", $nextline); } + $line = str_replace('\n',"\n",$line); $line = trim(stripslashes($line)); switch ($line) { case 'BEGIN:VFREEBUSY': @@ -333,9 +334,9 @@ foreach ($cal_filelist as $cal_key=>$filename) { break; case 'DESCRIPTION': - $data = str_replace("\\n", "<br />", $data); + $data = str_replace("\n", "<br />", $data); $data = str_replace("\\t", " ", $data); - $data = str_replace("\\r", "<br />", $data); + $data = str_replace("\r", "<br />", $data); $data = str_replace('$', '$', $data); $data = stripslashes($data); $data = htmlentities(urlencode($data)); |