[LON-CAPA-cvs] cvs: loncom /interface lonhelpmenu.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 03 Jul 2004 19:33:31 -0000
albertel Sat Jul 3 15:33:31 2004 EDT
Modified files:
/loncom/interface lonhelpmenu.pm
Log:
- no need to escape form parameters, they are auto escaped
- javascript string literals cannont contain newlines
- small style improvements
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.2 loncom/interface/lonhelpmenu.pm:1.3
--- loncom/interface/lonhelpmenu.pm:1.2 Sat Jul 3 15:05:12 2004
+++ loncom/interface/lonhelpmenu.pm Sat Jul 3 15:33:30 2004
@@ -40,12 +40,12 @@
if ($r->header_only) {
return OK;
}
- my $color = &Apache::lonnet::unescape($ENV{'form.color'});
- my $faq = &Apache::lonnet::unescape($ENV{'form.faq'});
- my $bug = &Apache::lonnet::unescape($ENV{'form.bug'});
- my $topic = &Apache::lonnet::unescape($ENV{'form.topic'});
- my $function = &Apache::lonnet::unescape($ENV{'form.function'});
- my $component_help = &Apache::lonnet::unescape($ENV{'form.component_help'});
+ my $color = $ENV{'form.color'};
+ my $faq = $ENV{'form.faq'};
+ my $bug = $ENV{'form.bug'};
+ my $topic = $ENV{'form.topic'};
+ my $function = $ENV{'form.function'};
+ my $component_help = $ENV{'form.component_help'};
my $origurl = $ENV{'form.origurl'};
my $component_url = $component_help;
if ($component_url) {
@@ -59,9 +59,9 @@
my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
if ($ENV{'form.page'} eq 'banner') {
- &display_help_banner ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
+ &display_help_banner($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
} elsif ($ENV{'form.page'} eq 'body') {
- &display_help_mainpage ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
+ &display_help_mainpage($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
}
return OK;
}
@@ -69,6 +69,7 @@
sub display_help_banner {
my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
my $bodytag = &Apache::loncommon::bodytag('',$function,'rightmargin="0" leftmargin="0" marginwidth="0" topmargin="1" marginheight="1"',1);
+ $bodytag=~/[\n\r]/ /g;
my $fontcolor = &Apache::loncommon::designparm($function.'.font');
my $alinkcolor = &Apache::loncommon::designparm($function.'.alink');
my $vlinkcolor = &Apache::loncommon::designparm($function.'.vlink');
@@ -166,6 +167,7 @@
sub display_help_mainpage {
my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1);
+ $bodytag=~/[\n\r]/ /g;
$r->print(<<END);
<html>
<head>