--- loncom/interface/londocs.pm 2004/12/23 20:50:35 1.162 +++ loncom/interface/londocs.pm 2005/01/08 06:34:30 1.163 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.162 2004/12/23 20:50:35 raeburn Exp $ +# $Id: londocs.pm,v 1.163 2005/01/08 06:34:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -214,7 +214,7 @@ sub dumpcourse { } my $title=$origcrsdata{'description'}; $title=~s/\s+/\_/gs; - $title=~s/\W//gs; + $title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs; $r->print('

'.&mt('Folder in Construction Space').'


'); &tiehash(); $r->print('

'.&mt('Filenames in Construction Space').'

'); @@ -223,12 +223,13 @@ sub dumpcourse { my ($ext)=($_=~/\.(\w+)$/); my $title=$hash{'title_'.$hash{ 'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}}; + $title=~s/:/:/g; $r->print(''); unless ($title) { $title=$_; } $title=~s/\.(\w+)$//; - $title=~s/[^\w\/]+/\_/gs; + $title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs; $title.='.'.$ext; $r->print("\n\n"); }
'.&mt('Internal Filename').''.&mt('Title').''.&mt('Save as ...').'
'.($title?$title:' ').'