Diff for /loncom/xml/lonxml.pm between versions 1.166 and 1.167

version 1.166, 2002/04/10 14:46:30 version 1.167, 2002/04/10 15:19:59
Line 62  package Apache::lonxml; Line 62  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);
 use strict;  use strict;
 use HTML::TokeParser();  use HTML::LCParser();
 use HTML::TreeBuilder();  use HTML::TreeBuilder();
 use HTML::Entities();  use HTML::Entities();
 use Safe();  use Safe();
Line 654  sub inner_xmlparse { Line 654  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);
   }    }
Line 1003  sub get_all_text { Line 1005  sub get_all_text {
   
 sub newparser {  sub newparser {
   my ($parser,$contentref,$dir) = @_;    my ($parser,$contentref,$dir) = @_;
   push (@$parser,HTML::TokeParser->new($contentref));    push (@$parser,HTML::LCParser->new($contentref));
   $$parser['-1']->xml_mode('1');    $$parser['-1']->xml_mode('1');
 #  $$parser['-1']->attr_encoded('1');  
   if ( $dir eq '' ) {    if ( $dir eq '' ) {
     push (@Apache::lonxml::pwd, $Apache::lonxml::pwd[$#Apache::lonxml::pwd]);      push (@Apache::lonxml::pwd, $Apache::lonxml::pwd[$#Apache::lonxml::pwd]);
   } else {    } else {
Line 1249  sub debug { Line 1250  sub debug {
 sub error {  sub error {
   if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {    if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {
     # If printing in construction space, put the error inside <pre></pre>      # If printing in construction space, put the error inside <pre></pre>
     print "<b>ERROR:</b><pre>".join("\n",@_)."</pre>\n";      print "<b>ERROR:</b>".join("\n",@_)."\n";
   } else {    } else {
     print "<b>An Error occured while processing this resource. The instructor has been notified.</b> <br />";      print "<b>An Error occured while processing this resource. The instructor has been notified.</b> <br />";
     #notify author      #notify author

Removed from v.1.166  
changed lines
  Added in v.1.167


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