--- loncom/interface/lonsupportreq.pm 2009/06/05 12:49:50 1.53
+++ loncom/interface/lonsupportreq.pm 2009/10/01 19:08:29 1.54
@@ -1,5 +1,5 @@
#
-# $Id: lonsupportreq.pm,v 1.53 2009/06/05 12:49:50 bisitz Exp $
+# $Id: lonsupportreq.pm,v 1.54 2009/10/01 19:08:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -566,13 +566,15 @@ END
if ($env{'form.'.$item} ne '') {
if ($item eq 'description') {
my $descrip = $env{'form.description'};
- $descrip =~ s|\n|
|g;
+ $descrip = &cleanup_html($descrip);
+ $descrip =~ s|[\n\r\f]|
|g;
$displaymsg .=
''.
"$lt{$item}: $descrip
\n";
} elsif ($item eq 'sourceurl') {
my $showurl = $env{'form.sourceurl'};
$showurl =~ s/\?.*$//;
+ $showurl = &cleanup_html($showurl);
$displaymsg .=
''.
"$lt{$item}: $showurl
\n";
@@ -581,9 +583,11 @@ END
''.
"$lt{$item}: $okcclist
\n";
} else {
+ my $showitem = $env{'form.'.$item};
+ $showitem = &cleanup_html($showitem);
$displaymsg .=
''.
- "$lt{$item}: $env{'form.'.$item}
\n";
+ "$lt{$item}: $showitem
\n";
}
}
}
@@ -846,9 +850,27 @@ sub get_domain {
} elsif ($env{'request.role.domain'}) {
$codedom = $env{'request.role.domain'};
} else {
- $codedom = $Apache::lonnet::perlvar{'lonDefDomain'};
+ $codedom = &Apache::lonnet::default_login_domain();
}
return $codedom;
}
+sub cleanup_html {
+ my ($incoming) = @_;
+ my $outgoing;
+ if ($incoming ne '') {
+ $outgoing = $incoming;
+ $outgoing =~ s/\#/#/g;
+ $outgoing =~ s/\&/&/g;
+ $outgoing =~ s/</g;
+ $outgoing =~ s/>/>/g;
+ $outgoing =~ s/\(/(/g;
+ $outgoing =~ s/\)/)/g;
+ $outgoing =~ s/"/"/g;
+ $outgoing =~ s/'/'/g;
+ $outgoing =~ s/\$/$/g;
+ }
+ return $outgoing;
+}
+
1;