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

version 1.3, 2010/04/27 20:29:25 version 1.5, 2010/05/24 23:47:22
Line 548  sub process_outgoing_html { Line 548  sub process_outgoing_html {
             if ($self->{target} ne 'tex') {              if ($self->{target} ne 'tex') {
            $output .= &Apache::lontexconvert::smiley($token->[1]);             $output .= &Apache::lontexconvert::smiley($token->[1]);
        } else {         } else {
                 $output .= $token->[1];                  my $t = $token->[1];
                   $t =~ s/([^\n\r\t &<>!\#%\(-;=?-~])/num_entity($1)/ge;
                   $output .= $t;
             }              }
         } elsif ($token->[0] eq 'D' || $token->[0] eq 'C') {          } elsif ($token->[0] eq 'D' || $token->[0] eq 'C') {
        $output .= $token->[1];         $output .= $token->[1];
Line 565  sub process_outgoing_html { Line 567  sub process_outgoing_html {
        }         }
     }      }
     }      }
   
     return $output;      return $output;
 }  }
   
Line 637  sub get_block_level_tags { Line 638  sub get_block_level_tags {
     return \@block;      return \@block;
 }  }
   
   sub num_entity {
       sprintf "&#x%X;", ord($_[0]);
   }
   
 ##############################################  ##############################################
 ##############################################  ##############################################
   
Line 716  sub parse_algebra_tag { Line 721  sub parse_algebra_tag {
     # decoding it first. we also just get the tex, and      # decoding it first. we also just get the tex, and
     # feed it through as if it were an <mi> tag.      # feed it through as if it were an <mi> tag.
     $input = &HTML::Entities::decode($input);      $input = &HTML::Entities::decode($input);
     my $algebra = &Apache::lontexconvert::algebra($input, 'tth', 'tex');      my $algebra = 
           &Apache::lontexconvert::algebra($input,'tex',undef,undef,undef,'tth');
     return &parse_m_tag($self, $algebra);      return &parse_m_tag($self, $algebra);
 }  }
   
Line 735  sub parse_md_tag { Line 741  sub parse_md_tag {
 sub parse_m_tag {  sub parse_m_tag {
     my $self = shift;      my $self = shift;
     my $input = shift;      my $input = shift;
     return &Apache::lontexconvert::to_convert($input, $self->{target});      if ($self->{target} ne 'tex') {
           return &Apache::lontexconvert::to_convert($input, $self->{target});
       } else {
           return '<m>'.$input.'</m>';
       }
 }  }
   
 sub parse_chem_tag {  sub parse_chem_tag {

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


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