--- loncom/interface/lonsupportreq.pm 2013/07/15 16:13:21 1.73 +++ loncom/interface/lonsupportreq.pm 2013/11/26 03:17:06 1.74 @@ -1,5 +1,5 @@ # -# $Id: lonsupportreq.pm,v 1.73 2013/07/15 16:13:21 bisitz Exp $ +# $Id: lonsupportreq.pm,v 1.74 2013/11/26 03:17:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -114,7 +114,7 @@ sub print_request_form { $formname = 'logproblem'; my $machine = &Apache::lonnet::absolute_url(); my $sourceurl = $machine.$origurl; - $server = $machine.&cleanup_html($origurl); + $server = $machine.&Apache::loncommon::cleanup_html($origurl); $server =~ s/\?.*$//; my %lt = &Apache::lonlocal::texthash ( email => 'The e-mail address you entered', @@ -676,10 +676,10 @@ sub print_request_receipt { } if (@bad_ccs == 1) { if ($bad_ccs[0] ne '') { - $badccmsg .= '
'.&mt('The following Cc e-mail address is invalid: ').&cleanup_html($bad_ccs[0]); + $badccmsg .= '
'.&mt('The following Cc e-mail address is invalid: ').&Apache::loncommon::cleanup_html($bad_ccs[0]); } } elsif (@bad_ccs > 1) { - $badccmsg .= '
'.&mt('The following Cc e-mail addresses are invalid: '). &cleanup_html(join(', ',@bad_ccs)); + $badccmsg .= '
'.&mt('The following Cc e-mail addresses are invalid: '). &Apache::loncommon::cleanup_html(join(', ',@bad_ccs)); } } $env{'form.user'} = "'".$env{'form.uname'}.':'.$env{'form.udom'}."'"; @@ -702,7 +702,7 @@ END if ($env{'form.'.$item} ne '') { if ($item eq 'description') { my $descrip = $env{'form.description'}; - $descrip = &cleanup_html($descrip); + $descrip = &Apache::loncommon::cleanup_html($descrip); $descrip =~ s|[\n\r\f]|
|g; $displaymsg .= ''. @@ -710,20 +710,20 @@ END } elsif ($item eq 'sourceurl') { my $showurl = $env{'form.sourceurl'}; $showurl =~ s/\?.*$//; - $showurl = &cleanup_html($showurl); + $showurl = &Apache::loncommon::cleanup_html($showurl); $displaymsg .= ''. "$lt{$item}: $showurl
\n"; } elsif ($item eq 'cc') { if ($okcclist) { - my $showcclist = &cleanup_html($okcclist); + my $showcclist = &Apache::loncommon::cleanup_html($okcclist); $displaymsg .= ''. "$lt{$item}: $showcclist
\n"; } } else { my $showitem = $env{'form.'.$item}; - $showitem = &cleanup_html($showitem); + $showitem = &Apache::loncommon::cleanup_html($showitem); $displaymsg .= ''. "$lt{$item}: $showitem
\n"; @@ -1030,26 +1030,4 @@ sub get_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; - $outgoing =~ s{/}{/}g; - $outgoing =~ s/=/=/g; - $outgoing =~ s/\\/\/g - } - return $outgoing; -} - 1;