[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 05 Jan 2007 16:40:29 -0000


albertel		Fri Jan  5 11:40:29 2007 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - protecting item in the re
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.264 loncom/interface/londocs.pm:1.265
--- loncom/interface/londocs.pm:1.264	Mon Dec  4 21:55:52 2006
+++ loncom/interface/londocs.pm	Fri Jan  5 11:40:27 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.264 2006/12/05 02:55:52 albertel Exp $
+# $Id: londocs.pm,v 1.265 2007/01/05 16:40:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -913,7 +913,7 @@
     while (@_) {
 	my $name = shift;
 	my $url = shift;
-        if (($url =~ m#^/uploaded/$coursedom/$coursenum/(default_\d+\.)(page|sequence)$#) && ($caller eq 'londocs')) {
+        if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$}) && ($caller eq 'londocs')) {
             my $errtext = '';
             my $fatal = 0;
             my $newmapstr = '<map>'."\n".
@@ -1617,7 +1617,7 @@
     $destination .= $newidx;
     my ($url,$filename);
     $url=&Apache::lonnet::userfileupload($formname.$num,1,$destination);
-    ($filename) = ($url =~ m-^/uploaded/$coursedom/$coursenum/$destination/(.+)$-);
+    ($filename) = ($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/\Q$destination\E/(.+)$});
     return $filename;
 }