--- loncom/interface/lonsupportreq.pm 2013/07/15 16:13:21 1.73 +++ loncom/interface/lonsupportreq.pm 2014/01/15 18:48:35 1.75 @@ -1,5 +1,5 @@ # -# $Id: lonsupportreq.pm,v 1.73 2013/07/15 16:13:21 bisitz Exp $ +# $Id: lonsupportreq.pm,v 1.75 2014/01/15 18:48:35 bisitz 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', @@ -555,9 +555,14 @@ sub print_request_receipt { if ($r->uri eq '/adm/helpdesk') { &print_header($r,$url,'process'); } - $r->print('

'.&mt('Support request failed').'

'. - ''. - &mt('Validation of the code you entered failed.'). + $r->print( + '

'.&mt('Support request failed').'

'. + &Apache::lonhtmlcommon::confirm_success( + &mt('Validation of the code you entered failed.'),1). + '

'. + &Apache::lonhtmlcommon::actionbox([ + &mt('[_1]Go back[_2] and try again', + '','')]). &Apache::loncommon::end_page()); return; } @@ -676,10 +681,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 +707,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 +715,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 +1035,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;