--- loncom/interface/lonannounce.pm 2003/06/18 15:02:20 1.13 +++ loncom/interface/lonannounce.pm 2003/06/18 20:06:29 1.15 @@ -1,7 +1,7 @@ # The LearningOnline Network # Announce # -# $Id: lonannounce.pm,v 1.13 2003/06/18 15:02:20 www Exp $ +# $Id: lonannounce.pm,v 1.15 2003/06/18 20:06:29 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,6 +32,7 @@ use strict; use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonhtmlcommon(); +use HTML::Entities(); my %todayhash; @@ -88,6 +89,8 @@ sub normalcell { $end.'">'; } } + $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\''); + $fullmsg=~s/&/\\&/g; $output.=''. substr($msg,0,20).'...
'; } @@ -108,6 +111,8 @@ sub plaincell { my $msg=join('@',@msg); my $fullmsg=$ENV{'course.'.$courseid.'.description'}. ', '.localtime($start).' - '.localtime($end).': '.$msg; + $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\''); + $fullmsg=~s/&/\\&/g; $output.=''. substr($msg,0,40).'...
'; } @@ -263,8 +268,7 @@ ENDDOCUMENT my ($pm,$py,$fm,$fy)=($month-1,$year,$month+1,$year); if ($pm<1) { ($pm,$py)=(12,$year-1); } if ($fm>12){ ($fm,$fy)=(1,$year+1); } - if (($year<1970) || ($year>2037)) { - } + $r->print('

'.('','January','February','March','April','May', 'June','July','August','September','October', 'November','December')[$month].' '.$year.'

');