--- loncom/interface/lonhtmlgateway.pm 2010/04/27 17:07:35 1.2
+++ loncom/interface/lonhtmlgateway.pm 2010/04/27 20:29:25 1.3
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# gateway for html input/output to be properly parsed and handled
#
-# $Id: lonhtmlgateway.pm,v 1.2 2010/04/27 17:07:35 faziophi Exp $
+# $Id: lonhtmlgateway.pm,v 1.3 2010/04/27 20:29:25 faziophi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -545,8 +545,12 @@ sub process_outgoing_html {
my $parser = HTML::LCParser->new(\$input);
while (my $token = $parser->get_token()) {
if ($token->[0] eq 'T') {
- $output .= $token->[1];
- } elsif ($token->[0] eq 'D' || $token->[0] eq 'C') {
+ if ($self->{target} ne 'tex') {
+ $output .= &Apache::lontexconvert::smiley($token->[1]);
+ } else {
+ $output .= $token->[1];
+ }
+ } elsif ($token->[0] eq 'D' || $token->[0] eq 'C') {
$output .= $token->[1];
} elsif ($token->[0] eq 'PI' || $token->[0] eq 'E') {
$output .= $token->[2];
@@ -712,7 +716,7 @@ sub parse_algebra_tag {
# decoding it first. we also just get the tex, and
# feed it through as if it were an tag.
$input = &HTML::Entities::decode($input);
- my $algebra = &Apache::lontexconvert::algebra($input, 'tex');
+ my $algebra = &Apache::lontexconvert::algebra($input, 'tth', 'tex');
return &parse_m_tag($self, $algebra);
}
@@ -802,7 +806,7 @@ Phil Fazio
=head1 VERSION
-$Id: lonhtmlgateway.pm,v 1.2 2010/04/27 17:07:35 faziophi Exp $
+$Id: lonhtmlgateway.pm,v 1.3 2010/04/27 20:29:25 faziophi Exp $
=cut