--- loncom/xml/lonxml.pm 2001/01/30 21:01:36 1.49
+++ loncom/xml/lonxml.pm 2001/02/19 20:40:55 1.54
@@ -236,13 +236,13 @@ sub callsub {
my $sub1;
no strict 'refs';
if (my $space=$Apache::lonxml::alltags{$token->[1]}) {
- #&Apache::lonxml::debug("Calling sub $sub in $space
\n");
+ #&Apache::lonxml::debug("Calling sub $sub in $space
\n");
$sub1="$space\:\:$sub";
$Apache::lonxml::curdepth=join('_',@Apache::lonxml::depthcounter);
$currentstring = &$sub1($target,$token,$parstack,$parser,
$safeeval,$style);
} else {
- #&Apache::lonxml::debug("NOT Calling sub $sub in $space
\n");
+ #&Apache::lonxml::debug("NOT Calling sub $sub in $space
\n");
if (defined($token->[4])) {
$currentstring = $token->[4];
} else {
@@ -269,7 +269,7 @@ sub increasedepth {
}
my $curdepth=join('_',@Apache::lonxml::depthcounter);
&Apache::lonxml::debug("s $Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1]\n");
-#print "
s $Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1]\n";
+#print "
s $Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1]\n";
}
sub decreasedepth {
@@ -285,7 +285,7 @@ sub decreasedepth {
}
my $curdepth=join('_',@Apache::lonxml::depthcounter);
&Apache::lonxml::debug("e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n");
-#print "
e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n";
+#print "
e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n";
}
sub get_all_text {
@@ -333,7 +333,8 @@ sub parstring {
map {
unless ($_=~/\W/) {
my $val=$token->[2]->{$_};
- if ($val =~ m/^[\%\@]/) { $val="\\".$val; }
+ $val =~ s/([\%\@\\])/\\$1/g;
+ #if ($val =~ m/^[\%\@]/) { $val="\\".$val; }
$temp .= "my \$$_=\"$val\";"
}
} @{$token->[3]};
@@ -378,12 +379,19 @@ sub handler {
$request->print('