[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 20 Nov 2003 21:43:24 -0000


albertel		Thu Nov 20 16:43:24 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - escape $ in args in some cases
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.292 loncom/xml/lonxml.pm:1.293
--- loncom/xml/lonxml.pm:1.292	Tue Nov 11 11:48:11 2003
+++ loncom/xml/lonxml.pm	Thu Nov 20 16:43:24 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.292 2003/11/11 16:48:11 sakharuk Exp $
+# $Id: lonxml.pm,v 1.293 2003/11/20 21:43:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -992,6 +992,7 @@
       my $val=$token->[2]->{$_};
       $val =~ s/([\%\@\\\"\'])/\\$1/g;
       #if ($val =~ m/^[\%\@]/) { $val="\\".$val; }
+      if ($val !~ m/^\s*\$[a-z_]/i) { $val =~ s/\$/\\\$/g; }
       $temp .= "my \$$_=\"$val\";";
     }
   }