--- loncom/publisher/testbankimport.pm 2006/04/10 22:30:31 1.10 +++ loncom/publisher/testbankimport.pm 2006/12/06 22:22:39 1.11 @@ -1,5 +1,5 @@ # Handler for parsing text upload problem descriptions into .problems -# $Id: testbankimport.pm,v 1.10 2006/04/10 22:30:31 albertel Exp $ +# $Id: testbankimport.pm,v 1.11 2006/12/06 22:22:39 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -35,6 +35,7 @@ use HTML::Entities(); use Apache::lonlocal; use Apache::lonupload; use File::Basename(); +use LONCAPA(); # ---------------------------------------------------------------- Display Control sub display_control { @@ -1736,7 +1737,7 @@ sub handler { $fn=$env{'form.filename'}; $fn=~s/^http\:\/\/[^\/]+\///; $fn=~s/^\///; - $fn=~s/(\~|priv\/)(\w+)//; + $fn=~s{(~|priv/)($LONCAPA::username_re)}{}; $fn=~s/\/+/\//g; } else { $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.