--- loncom/lonnet/perl/lonnet.pm 2002/08/09 19:49:30 1.266 +++ loncom/lonnet/perl/lonnet.pm 2002/08/17 18:23:27 1.268 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.266 2002/08/09 19:49:30 albertel Exp $ +# $Id: lonnet.pm,v 1.268 2002/08/17 18:23:27 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1114,7 +1114,7 @@ sub str2hashref { } } else { $string =~ s/^(.*?)=//; - $key=$1 + $key=&unescape($1); } $string =~ s/^=//; @@ -3135,6 +3135,14 @@ sub declutter { return $thisfn; } +# ------------------------------------------------------------- Clutter up URLs + +sub clutter { + my $thisfn='/'.&declutter(shift); + unless ($thisfn=~/^\/(uploaded|adm)\//) { $thisfn='/res'.$thisfn; } + return $thisfn; +} + # -------------------------------------------------------- Escape Special Chars sub escape {