aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions/ical_parser.php7
-rw-r--r--functions/init/sanitize.php3
2 files changed, 3 insertions, 7 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 9baa247..d3031d7 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -126,6 +126,7 @@ foreach ($cal_filelist as $cal_key=>$filename) {
$nextline = ereg_replace("[\r\n]", "", $nextline);
}
$line = str_replace('\n',"\n",$line);
+ $line = str_replace('\t',"\t",$line);
$line = trim(stripslashes($line));
switch ($line) {
case 'BEGIN:VFREEBUSY':
@@ -321,9 +322,6 @@ foreach ($cal_filelist as $cal_key=>$filename) {
break;
case 'SUMMARY':
- $data = str_replace("\\n", "<br />", $data);
- $data = str_replace("\\t", "&nbsp;", $data);
- $data = str_replace("\\r", "<br />", $data);
$data = str_replace('$', '&#36;', $data);
$data = stripslashes($data);
$data = htmlentities(urlencode($data));
@@ -335,9 +333,6 @@ foreach ($cal_filelist as $cal_key=>$filename) {
break;
case 'DESCRIPTION':
- $data = str_replace("\n", "<br />", $data);
- $data = str_replace("\\t", "&nbsp;", $data);
- $data = str_replace("\r", "<br />", $data);
$data = str_replace('$', '&#36;', $data);
$data = stripslashes($data);
$data = htmlentities(urlencode($data));
diff --git a/functions/init/sanitize.php b/functions/init/sanitize.php
index da9fb3f..39b8246 100644
--- a/functions/init/sanitize.php
+++ b/functions/init/sanitize.php
@@ -60,7 +60,8 @@ function sanitizeForWeb($string) {
$string = str_replace('"', '&#34;', $string);
$string = str_replace("\n", '<br />', $string);
-
+ $string = str_replace("\t", ' &nbsp; &nbsp; ', $string);
+
return $string;
}

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