d9bd766f9b0eaf7fedb91d0e10fe9ea23e29887e
[kivitendo-erp.git] / SL / Template / XML.pm
1 package SL::Template::XML;
2
3 use parent qw(SL::Template::HTML);
4
5 use strict;
6
7 sub new {
8   #evtl auskommentieren
9   my $type = shift;
10
11   return $type->SUPER::new(@_);
12 }
13
14 sub format_string {
15   my ($self, $variable) = @_;
16   my $form = $self->{"form"};
17
18   $variable = $main::locale->quote_special_chars('Template/XML', $variable);
19
20   # Allow no markup to be converted into the output format
21   my @markup_replace = ('b', 'i', 's', 'u', 'sub', 'sup');
22
23   foreach my $key (@markup_replace) {
24     $variable =~ s/\<(\/?)${key}\>//g;
25   }
26
27   return $variable;
28 }
29
30 sub get_mime_type() {
31   my ($self) = @_;
32
33   return "text";
34
35 }
36
37 sub uses_temp_file {
38   # tempfile needet for XML Output
39   return 1;
40 }
41
42 1;