Diff for /loncom/xml/lonxml.pm between versions 1.531.2.18 and 1.531.2.19

version 1.531.2.18, 2015/03/11 13:10:56 version 1.531.2.19, 2015/04/06 17:02:33
Line 463  sub inner_xmlparse { Line 463  sub inner_xmlparse {
   my $result;    my $result;
   my $token;    my $token;
   my $dontpop=0;    my $dontpop=0;
     my $lastdontpop;
     my $lastendtag;
   my $startredirection = $Apache::lonxml::redirection;    my $startredirection = $Apache::lonxml::redirection;
   while ( $#$pars > -1 ) {    while ( $#$pars > -1 ) {
     while ($token = $$pars['-1']->get_token) {      while ($token = $$pars['-1']->get_token) {
Line 558  sub inner_xmlparse { Line 560  sub inner_xmlparse {
       }        }
       $result = '';        $result = '';
   
       if ($token->[0] eq 'E' && !$dontpop) {        if ($token->[0] eq 'E') {
  &end_tag($stack,$parstack,$token);            if ($dontpop) {
                 $lastdontpop = $token;
             } else {
                 $lastendtag = $token->[1];
                 &end_tag($stack,$parstack,$token);
             }
       }        }
       $dontpop=0;        $dontpop=0;
     }      }
     if ($#$pars > -1) {      if ($#$pars > -1) {
  pop @$pars;   pop @$pars;
  pop @Apache::lonxml::pwd;   pop @Apache::lonxml::pwd;
     }      }
   }    }
   
     if (($#$stack == 0) && ($stack->[0] eq 'physnet') && ($target eq 'web') &&
         ($lastendtag eq 'LONCAPA_INTERNAL_TURN_STYLE_ON')) {
          if ((ref($lastdontpop) eq 'ARRAY') && ($lastdontpop->[1] eq 'physnet')) {
              &end_tag($stack,$parstack,$lastdontpop);
          }
      }
   
   # if ($target eq 'meta') {    # if ($target eq 'meta') {
   #   $finaloutput.=&endredirection;    #   $finaloutput.=&endredirection;
   # }    # }
Line 1555  SIMPLECONTENT Line 1569  SIMPLECONTENT
   
 sub verify_html {  sub verify_html {
     my ($filecontents)=@_;      my ($filecontents)=@_;
     my ($is_html,$is_xml);      my ($is_html,$is_xml,$is_physnet);
     if ($filecontents =~/(?:\<|\&lt\;)\?xml[^\<]*\?(?:\>|\&gt\;)/is) {      if ($filecontents =~/(?:\<|\&lt\;)\?xml[^\<]*\?(?:\>|\&gt\;)/is) {
         $is_xml = 1;          $is_xml = 1;
     } elsif ($filecontents =~/(?:\<|\&lt\;)html(?:\s+[^\<]+|\s*)(?:\>|\&gt\;)/is) {      } elsif ($filecontents =~/(?:\<|\&lt\;)html(?:\s+[^\<]+|\s*)(?:\>|\&gt\;)/is) {
         $is_html = 1;          $is_html = 1;
       } elsif ($filecontents =~/(?:\<|\&lt\;)physnet[^\<]*(?:\>|\&gt\;)/is) {
           $is_physnet = 1;
     }      }
     unless ($is_xml || $is_html) {      unless ($is_xml || $is_html || $is_physnet) {
         return &mt('File does not have [_1] or [_2] starting tag','&lt;html&gt;','&lt;?xml ?&gt;');          return &mt('File does not have [_1] or [_2] starting tag','&lt;html&gt;','&lt;?xml ?&gt;');
     }      }
     if ($is_html) {      if ($is_html) {

Removed from v.1.531.2.18  
changed lines
  Added in v.1.531.2.19


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