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

version 1.164, 2002/04/03 18:47:39 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 446  ENDDONOTREGTHIS Line 446  ENDDONOTREGTHIS
  # Inputs are the name of the html form being used   # Inputs are the name of the html form being used
  # and the name of the element the selected URL should   # and the name of the element the selected URL should
  # be placed in.   # be placed in.
           # openbrowser also takes arguments only and omit, which are
           # comma deliminated lists of file extensions to (only) show 
           # or omit.
           # Here we also set currentURL=null.
         $result .=<<"ENDBROWSERSCRIPT";          $result .=<<"ENDBROWSERSCRIPT";
 <script>  <script>
       menu.currentURL=null;
     var editbrowser;      var editbrowser;
     function openbrowser(formname,elementname,only,omit) {      function openbrowser(formname,elementname,only,omit) {
         var url = '/res/?';          var url = '/res/?';
Line 649  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 998  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 1243  sub debug { Line 1249  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') ) {
     print "<b>ERROR:</b>".join('<br />',@_)."<br />\n";      # If printing in construction space, put the error inside <pre></pre>
       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.164  
changed lines
  Added in v.1.167


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