--- loncom/interface/lonprintout.pm 2003/05/28 21:25:33 1.187 +++ loncom/interface/lonprintout.pm 2003/06/19 14:54:51 1.189 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.187 2003/05/28 21:25:33 www Exp $ +# $Id: lonprintout.pm,v 1.189 2003/06/19 14:54:51 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -857,7 +857,7 @@ sub printHelper { # very first screen. # Detect whether we're coming from construction space if ($ENV{'form.postdata'} =~ /http:\/\// ) { - $ENV{'form.postdata'} =~ /http:\/\/[a-zA-Z.]+\/~([a-zA-Z0-9]+)\/(.*)/; + $ENV{'form.postdata'} =~ /http:\/\/[^\/]+\/~([^\/]+)\/(.*)/; $helper->{VARS}->{'filename'} = "/home/$1/public_html/$2"; $helper->{VARS}->{'construction'} = 1; } else { @@ -913,6 +913,8 @@ sub printHelper { if (not $helper->{VARS}->{'construction'}) { $subdir='/home/httpd/html/res/'.$subdir; } + # "Remove all duplicate slashes." + $subdir =~ s|/+|/|g; # What can be printed is a very dynamic decision based on # lots of factors. So we need to dynamically build this list.