--- loncom/xml/lonxml.pm 2004/10/05 18:54:49 1.340 +++ loncom/xml/lonxml.pm 2004/10/05 20:18:29 1.341 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.340 2004/10/05 18:54:49 albertel Exp $ +# $Id: lonxml.pm,v 1.341 2004/10/05 20:18:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1028,6 +1028,7 @@ sub parstring { unless ($_=~/\W/) { my $val=$token->[2]->{$_}; $val =~ s/([\%\@\\\"\'])/\\$1/g; + $val =~ s/^(\$\d)/\\$1/; #if ($val =~ m/^[\%\@]/) { $val="\\".$val; } $temp .= "my \$$_=\"$val\";"; } @@ -1477,7 +1478,7 @@ sub get_param_var { } elsif ( $args !~ /my \$\Q$param\E=\"/ ) { return undef; } my $value=&Apache::run::run("{$args;".'return $'.$param.'}',$safeeval); #' &Apache::lonxml::debug("first run is $value"); - if ($value =~ /^[\$\@\%]\w+$/) { + if ($value =~ /^[\$\@\%][a-zA-Z_]\w*$/) { &Apache::lonxml::debug("doing second"); my @result=&Apache::run::run("return $value",$safeeval,1); if (!defined($result[0])) {