Diff for /loncom/interface/lonhtmlgateway.pm between versions 1.1 and 1.3

version 1.1, 2010/04/26 20:45:28 version 1.3, 2010/04/27 20:29:25
Line 545  sub process_outgoing_html { Line 545  sub process_outgoing_html {
     my $parser = HTML::LCParser->new(\$input);      my $parser = HTML::LCParser->new(\$input);
     while (my $token = $parser->get_token()) {      while (my $token = $parser->get_token()) {
     if ($token->[0] eq 'T') {      if ($token->[0] eq 'T') {
        $output .= $token->[1];              if ($self->{target} ne 'tex') {
     } elsif ($token->[0] eq 'D' || $token->[0] eq 'C') {             $output .= &Apache::lontexconvert::smiley($token->[1]);
          } else {
                   $output .= $token->[1];
               }
           } elsif ($token->[0] eq 'D' || $token->[0] eq 'C') {
        $output .= $token->[1];         $output .= $token->[1];
     } elsif ($token->[0] eq 'PI' || $token->[0] eq 'E') {      } elsif ($token->[0] eq 'PI' || $token->[0] eq 'E') {
        $output .= $token->[2];         $output .= $token->[2];
Line 709  sub parse_algebra_tag { Line 713  sub parse_algebra_tag {
     # the <algebra> parser does NOT handle entities,      # the <algebra> parser does NOT handle entities,
     # unlike the general <m> parser; thus we run      # unlike the general <m> parser; thus we run
     # the content of this tag through HTML::Entities,      # the content of this tag through HTML::Entities,
     # decoding it first      # decoding it first. we also just get the tex, and
       # feed it through as if it were an <mi> tag.
     $input = &HTML::Entities::decode($input);      $input = &HTML::Entities::decode($input);
     return &Apache::lontexconvert::algebra($input,$self->{target});      my $algebra = &Apache::lontexconvert::algebra($input, 'tth', 'tex');
       return &parse_m_tag($self, $algebra);
 }  }
   
 sub parse_mi_tag {  sub parse_mi_tag {
     my $self = shift;      my $self = shift;
     my $input = shift;      my $input = shift;
     return &parse_m_tag($self, '$'.$input.'$');      return &parse_m_tag($self, '\ensuremath{'.$input.'}');
 }  }
   
 sub parse_md_tag {  sub parse_md_tag {

Removed from v.1.1  
changed lines
  Added in v.1.3


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