--- loncom/xml/scripttag.pm 2004/01/16 19:46:03 1.106 +++ loncom/xml/scripttag.pm 2004/04/12 23:01:57 1.111 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Script Vars
"; + $result.= "');newWindow.document.close();}Script Vars
"; } } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); #$result="
<$token->[1]> output:
$bodytext
Source:
"; - my $bodytext=&Apache::lonxml::get_all_text("/script",$parser); + my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); $result=&Apache::edit::tag_start($target,$token,'Script'); $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4); + } elsif ($target eq 'meta') { + my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); } } else { if ($target ne "meta") { $result = $token->[4]; - my $bodytext=&Apache::lonxml::get_all_text("/script",$parser); + my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); $result.=$bodytext; } } @@ -169,7 +172,7 @@ sub start_display { } elsif ( $target eq 'web' || $target eq 'tex' || $target eq 'grade' || $target eq 'answer' || $target eq 'analyze') { - my $bodytext=&Apache::lonxml::get_all_text("/display",$parser); + my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser); if (!$Apache::lonxml::default_homework_loaded) { &Apache::lonxml::default_homework_load($safeeval); } @@ -180,12 +183,14 @@ sub start_display { } $Apache::lonxml::post_evaluate=0; } elsif ($target eq "edit" ) { - my $bodytext=&Apache::lonxml::get_all_text("/display",$parser); + my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser); #$result = # "
<$token->[1]> output:
$bodytext
Source:
"; #$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,1); $result=&Apache::edit::tag_start($target,$token,'Script With Display'); $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,1) + } elsif ($target eq 'meta') { + my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser); } return $result; } @@ -477,7 +482,8 @@ sub end_comment { sub xmlparse { my ($string) = @_; -# &Apache::lonxml::debug("Got $string"); + &Apache::lonxml::debug("xmlparse recursion starting with $string"); + if ($string eq '&xmlparse') { return '&xmlparse'; } my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)= @Apache::scripttag::parser_env; my @parser; @@ -485,6 +491,7 @@ sub xmlparse { my $result=&Apache::lonxml::inner_xmlparse($target,$tagstack, $parstack,\@parser, $safeeval,$style); + &Apache::lonxml::debug("xmlparse recursion ending with $result"); return $result; }