--- loncom/publisher/loncleanup.pm 2006/04/06 22:15:18 1.7 +++ loncom/publisher/loncleanup.pm 2008/12/24 07:58:34 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to cleanup XML files # -# $Id: loncleanup.pm,v 1.7 2006/04/06 22:15:18 albertel Exp $ +# $Id: loncleanup.pm,v 1.10 2008/12/24 07:58:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,9 @@ use Apache::loncacc; use Apache::loncommon(); use Apache::lonlocal; use Apache::lonnet; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + sub latextrans { my $symbolfont=shift; @@ -294,9 +297,9 @@ sub phasetwo { $warningcount.' '.&mt('warning(s)'). '
'. &mt('Open (and edit) cleaned up file in new window').''. - '
'. + &escape($newuri).'" target="prev">'. &mt('Show diffs in new window').'
'. ''. ''. @@ -332,7 +335,7 @@ sub handler { if ($env{'form.filename'}) { $fn=$env{'form.filename'}; - $fn=~s/^http\:\/\/[^\/]+//; + $fn=~s/^https?\:\/\/[^\/]+//; } else { $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. ' unspecified filename for cleanup', $r->filename); @@ -359,7 +362,7 @@ sub handler { return HTTP_NOT_ACCEPTABLE; } - $fn=~s/\/\~(\w+)//; + $fn=~s{/~($LONCAPA::username_re)}{}; &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header;