aboutsummaryrefslogtreecommitdiffstats
path: root/functions/ical_parser.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2009-01-26 03:51:52 +0000
committerJim Hu <jimhu@users.sourceforge.net>2009-01-26 03:51:52 +0000
commit46a025425efdd8f196d17465308f108d8f01992f (patch)
treece44185de16517170067d763f858699d389180b9 /functions/ical_parser.php
parent9c1ad1c80dbdf3cfa73477437c33fb821a0424b8 (diff)
downloadphpicalendar-46a025425efdd8f196d17465308f108d8f01992f.tar.gz
phpicalendar-46a025425efdd8f196d17465308f108d8f01992f.tar.bz2
phpicalendar-46a025425efdd8f196d17465308f108d8f01992f.zip
fix multiline descriptions
Diffstat (limited to 'functions/ical_parser.php')
-rw-r--r--functions/ical_parser.php5
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", "&nbsp;", $data);
- $data = str_replace("\\r", "<br />", $data);
+ $data = str_replace("\r", "<br />", $data);
$data = str_replace('$', '&#36;', $data);
$data = stripslashes($data);
$data = htmlentities(urlencode($data));

© 2014-2024 Faster IT GmbH | imprint | privacy policy