kivitendo/SL/Template/XML.pm @ 3a35d09f
0fba3edd | Moritz Bunkus | package SL::Template::XML;
|
||
439e45e4 | Moritz Bunkus | use parent qw(SL::Template::HTML);
|
||
0fba3edd | Moritz Bunkus | |||
use strict;
|
||||
sub new {
|
||||
#evtl auskommentieren
|
||||
my $type = shift;
|
||||
return $type->SUPER::new(@_);
|
||||
}
|
||||
sub format_string {
|
||||
my ($self, $variable) = @_;
|
||||
my $form = $self->{"form"};
|
||||
$variable = $main::locale->quote_special_chars('Template/XML', $variable);
|
||||
# Allow no markup to be converted into the output format
|
||||
my @markup_replace = ('b', 'i', 's', 'u', 'sub', 'sup');
|
||||
foreach my $key (@markup_replace) {
|
||||
$variable =~ s/\<(\/?)${key}\>//g;
|
||||
}
|
||||
return $variable;
|
||||
}
|
||||
sub get_mime_type() {
|
||||
my ($self) = @_;
|
||||
127b0df3 | Jan Büren | return "text";
|
||
0fba3edd | Moritz Bunkus | }
|
||
sub uses_temp_file {
|
||||
# tempfile needet for XML Output
|
||||
return 1;
|
||||
}
|
||||
1;
|