--- loncom/interface/loncss.pm 2006/09/06 19:08:33 1.4 +++ loncom/interface/loncss.pm 2006/11/27 16:47:16 1.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # gerenates a lon-capa CSS response # -# $Id: loncss.pm,v 1.4 2006/09/06 19:08:33 albertel Exp $ +# $Id: loncss.pm,v 1.6 2006/11/27 16:47:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,7 @@ use Apache::loncommon; use Apache::Constants qw(:common); use POSIX qw(strftime); use CGI::Cookie(); +use LONCAPA; sub handler { my ($r) = @_; @@ -45,7 +46,7 @@ sub handler { split(':',$url); $r->content_type('text/css'); - my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime(time+600)); + my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime(time+86400)); $r->header_out("Expires" => $date); my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); @@ -53,8 +54,7 @@ sub handler { my $handle; if ($cookies{'lonID'}) { - $handle=$cookies{'lonID'}->value; - $handle=~s/\W//g; + $handle=&LONCAPA::clean_handle($cookies{'lonID'}->value); } if ($handle ne ''