[LON-CAPA-cvs] cvs: loncom /publisher testbankimport.pm

raeburn raeburn@source.lon-capa.org
Fri, 19 Dec 2008 03:53:00 -0000


raeburn		Fri Dec 19 03:53:00 2008 EDT

  Modified files:              
    /loncom/publisher	testbankimport.pm 
  Log:
  - Regular Expressions for both http and https.
  
  
Index: loncom/publisher/testbankimport.pm
diff -u loncom/publisher/testbankimport.pm:1.18 loncom/publisher/testbankimport.pm:1.19
--- loncom/publisher/testbankimport.pm:1.18	Wed Sep 24 19:48:29 2008
+++ loncom/publisher/testbankimport.pm	Fri Dec 19 03:53:00 2008
@@ -1,5 +1,5 @@
 # Handler for parsing text upload problem descriptions into .problems
-# $Id: testbankimport.pm,v 1.18 2008/09/24 19:48:29 raeburn Exp $
+# $Id: testbankimport.pm,v 1.19 2008/12/19 03:53:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1817,7 +1817,7 @@
     my ($fn,$filename);
     if ($env{'form.filename'}) {
         $fn=$env{'form.filename'};
-        $fn=~s/^http\:\/\/[^\/]+\///;
+        $fn=~s/^https?\:\/\/[^\/]+\///;
         $fn=~s/^\///;
         $fn=~s{(~|priv/)($LONCAPA::username_re)}{};
         $fn=~s/\/+/\//g;