version 1.3, 2010/04/27 20:29:25
|
version 1.4, 2010/05/04 19:45:05
|
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 735 sub parse_md_tag {
|
Line 740 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 { |