Revision 58196889
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
SL/ReportGenerator.pm | ||
---|---|---|
61 | 61 |
sub _init_escaped_strings_map { |
62 | 62 |
my $self = shift; |
63 | 63 |
|
64 |
$self->{escaped_strings_map} = |
|
65 |
('ä' => '?',
|
|
66 |
'ö' => '?',
|
|
67 |
'ü' => '?',
|
|
68 |
'Ä' => '?',
|
|
69 |
'Ö' => '?',
|
|
70 |
'Ü' => '?',
|
|
71 |
'ß' => '?',
|
|
72 |
'>' => '>',
|
|
64 |
$self->{escaped_strings_map} = {
|
|
65 |
'ä' => '?', |
|
66 |
'ö' => '?', |
|
67 |
'ü' => '?', |
|
68 |
'Ä' => '?', |
|
69 |
'Ö' => '?', |
|
70 |
'Ü' => '?', |
|
71 |
'ß' => '?', |
|
72 |
'>' => '>', |
|
73 | 73 |
'<' => '<', |
74 |
'"' => '"'); |
|
74 |
'"' => '"', |
|
75 |
}; |
|
75 | 76 |
|
76 | 77 |
my $iconv = $main::locale->{iconv_iso8859}; |
77 | 78 |
|
... | ... | |
521 | 522 |
my $self = shift; |
522 | 523 |
my $text = shift; |
523 | 524 |
|
524 |
foreach my $key (keys %{ $self->{escaped_strigns_map} }) {
|
|
525 |
foreach my $key (keys %{ $self->{escaped_strings_map} }) {
|
|
525 | 526 |
$text =~ s/\Q$key\E/$self->{escaped_strings_map}->{$key}/g; |
526 | 527 |
} |
527 | 528 |
|
Auch abrufbar als: Unified diff
1. Schreibfehler in Variablenname. 2. Hashreferenzen in Hashes speichern, nicht Hashes selber.