From 57e29168bda95ffdb6cb96cc3c9f5d6ea8981daa Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 28 Oct 2002 21:33:53 +0000 Subject: Fixed validation errors (perhaps?). --- rss/rss.php | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'rss') diff --git a/rss/rss.php b/rss/rss.php index 0583e56..bdd8008 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -27,10 +27,10 @@ $rss .= ''."\n"; $rss .= ''."\n"; $rss .= ''.$cal_displayname.' - '.$theview.''."\n"; -$rss .= ''.$default_path.''."\n"; +$rss .= ''.htmlspecialchars ("$default_path").''."\n"; $rss .= ''.$cal_displayname.' '.$calendar_lang.' - '.$theview.''."\n"; $rss .= ''.$rss_language.''."\n"; -$rss .= 'Copyright 2002, '.$default_path.''."\n"; +$rss .= 'Copyright 2002, '.htmlspecialchars ("$default_path").''."\n"; if ($rssview == 'day') { @@ -44,10 +44,13 @@ if ($rssview == 'day') { $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); $description = stripslashes(urldecode($val["description"])); $description = strip_tags($description, ''); + $rss_title = htmlspecialchars ("$event_start $event_text"); + $rss_link = htmlspecialchars ("$default_path/day.php?getdate=$getdate&cal=$cal"); + $rss_decription = htmlspecialchars ("$description"); $rss .= ''."\n"; - $rss .= ''.$event_start.' '.$event_text.''."\n"; - $rss .= ''.$default_path.'/day.php?getdate='.$getdate.'&cal='.$cal.''."\n"; - $rss .= ''.$description.''."\n"; + $rss .= ''.$rss_title.''."\n"; + $rss .= ''.$rss_link.''."\n"; + $rss .= ''.$rss_description.''."\n"; $rss .= ''."\n"; $events_week++; } @@ -56,7 +59,7 @@ if ($rssview == 'day') { if ($events_week < 1) { $rss .= ''."\n"; $rss .= ''.$no_events_day_lang.''."\n"; - $rss .= ''.$default_path.''."\n"; + $rss .= ''.htmlspecialchars ("$default_path").''."\n"; $rss .= ''."\n"; } } @@ -78,10 +81,13 @@ if ($rssview == "week") { $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); $description = stripslashes(urldecode($val["description"])); $description = strip_tags($description, ''); + $rss_title = htmlspecialchars ("$dayofweek: $event_text"); + $rss_link = htmlspecialchars ("$default_path/day.php?getdate=$getdate&cal=$cal"); + $rss_decription = htmlspecialchars ("$dayofweek $event_start: $description"); $rss .= ''."\n"; - $rss .= ''.$dayofweek.': '.$event_text.''."\n"; - $rss .= ''.$default_path.'/day.php?getdate='.$getdate.'&cal='.$cal.''."\n"; - $rss .= ''.$dayofweek.' '.$event_start.': '.$description.''."\n"; + $rss .= ''.$rss_title.''."\n"; + $rss .= ''.$rss_link.''."\n"; + $rss .= ''.$rss_description.''."\n"; $rss .= ''."\n"; $events_week++; } @@ -90,7 +96,7 @@ if ($rssview == "week") { if ($events_week < 1) { $rss .= ''."\n"; $rss .= ''.$no_events_week_lang.''."\n"; - $rss .= ''.$default_path.''."\n"; + $rss .= ''.htmlspecialchars ("$default_path").''."\n"; $rss .= ''."\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); @@ -121,10 +127,13 @@ if ($rssview == "month") { $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); $description = stripslashes(urldecode($val["description"])); $description = strip_tags($description, ''); + $rss_title = htmlspecialchars ("$dayofmonth: $event_text"); + $rss_link = htmlspecialchars ("$default_path/day.php?getdate=$getdate&cal=$cal"); + $rss_decription = htmlspecialchars ("$dayofmonth $event_start: $description"); $rss .= ''."\n"; - $rss .= ''.$dayofmonth.': '.$event_text.''."\n"; - $rss .= ''.$default_path.'/day.php?getdate='.$getdate.'&cal='.$cal.''."\n"; - $rss .= ''.$dayofmonth.' '.$event_start.': '.$description.''."\n"; + $rss .= ''.$rss_title.''."\n"; + $rss .= ''.$rss_link.''."\n"; + $rss .= ''.$rss_description.''."\n"; $rss .= ''."\n"; $events_week++; } @@ -132,7 +141,7 @@ if ($rssview == "month") { if ($events_week < 1) { $rss .= ''."\n"; $rss .= ''.$no_events_month_lang.''."\n"; - $rss .= ''.$default_path.''."\n"; + $rss .= ''.htmlspecialchars ("$default_path").''."\n"; $rss .= ''."\n"; } } -- cgit v1.2.3