Diff for /loncom/xml/lonxml.pm between versions 1.168 and 1.169

version 1.168, 2002/05/01 21:40:25 version 1.169, 2002/05/16 00:56:46
Line 60 Line 60
   
 package Apache::lonxml;   package Apache::lonxml; 
 use vars   use vars 
 qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace);  qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $prevent_entity_encode);
 use strict;  use strict;
 use HTML::LCParser();  use HTML::LCParser();
 use HTML::TreeBuilder();  use HTML::TreeBuilder();
Line 129  $evaluate = 1; Line 129  $evaluate = 1;
 # stores the list of active tag namespaces  # stores the list of active tag namespaces
 @namespace=();  @namespace=();
   
   # if 0 all high ASCII characters will be encoded into HTML Entities
   $prevent_entity_encode=0;
   
 # has the dynamic menu been updated to know about this resource  # has the dynamic menu been updated to know about this resource
 $Apache::lonxml::registered=0;  $Apache::lonxml::registered=0;
   
Line 624  sub inner_xmlparse { Line 627  sub inner_xmlparse {
       #evaluate variable refs in result        #evaluate variable refs in result
       if ($result ne "") {        if ($result ne "") {
  if ( $#$parstack > -1 ) {   if ( $#$parstack > -1 ) {
   if ($Apache::lonxml::redirection) {    $result=&Apache::run::evaluate($result,$safeeval,$$parstack[-1]);
     $Apache::lonxml::outputstack['-1'] .=   
       &Apache::run::evaluate($result,$safeeval,$$parstack['-1']);  
   } else {  
     $finaloutput .= &Apache::run::evaluate($result,$safeeval,  
    $$parstack['-1']);  
   }  
  } else {   } else {
   $finaloutput .= &Apache::run::evaluate($result,$safeeval,'');    $result= &Apache::run::evaluate($result,$safeeval,'');
  }   }
  $result = '';  
       }        }
         # Encode any high ASCII characters
         if (!$Apache::lonxml::prevent_entity_encode) {
    $result=&HTML::Entities::encode($result,"\200-\377");
         }
         if ($Apache::lonxml::redirection) {
    $Apache::lonxml::outputstack['-1'] .= $result;
         } else {
    $finaloutput.=$result;
         }
         $result = '';
   
       if ($token->[0] eq 'E') {         if ($token->[0] eq 'E') { 
  &end_tag($stack,$parstack,$token);   &end_tag($stack,$parstack,$token);
       }        }
Line 648  sub inner_xmlparse { Line 655  sub inner_xmlparse {
   #   $finaloutput.=&endredirection;    #   $finaloutput.=&endredirection;
   # }    # }
   
   # Encode any high ASCII characters  
   $finaloutput=&HTML::Entities::encode($finaloutput,"\200-\377");  
   if (($ENV{'QUERY_STRING'}) && ($target eq 'web')) {    if (($ENV{'QUERY_STRING'}) && ($target eq 'web')) {
     $finaloutput=&afterburn($finaloutput);      $finaloutput=&afterburn($finaloutput);
   }    }

Removed from v.1.168  
changed lines
  Added in v.1.169


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>