Revision 47978b5b
Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use strict; |
7 | 7 |
|
8 |
sub _H { |
|
9 |
my $string = shift; |
|
10 |
return $::locale->quote_special_chars('HTML', $string); |
|
11 |
} |
|
12 |
|
|
8 | 13 |
sub new { |
9 | 14 |
my $class = shift; |
10 | 15 |
my $context = shift; |
... | ... | |
20 | 25 |
while (my ($name, $value) = each %{ $options }) { |
21 | 26 |
next unless $name; |
22 | 27 |
$value ||= ''; |
23 |
push @result, "${name}=\"" . $::locale->quote_special_chars('HTML', $value) . '"';
|
|
28 |
push @result, _H($name) . '="' . _H($value) . '"';
|
|
24 | 29 |
} |
25 | 30 |
|
26 | 31 |
return @result ? ' ' . join(' ', @result) : ''; |
... | ... | |
67 | 72 |
my %attributes = ( value => $result[0] ); |
68 | 73 |
$attributes{selected} = 'selected' if $options->{default} && ($options->{default} eq ($result[0] || '')); |
69 | 74 |
|
70 |
push @tags, $self->html_tag('option', $result[1], \%attributes);
|
|
75 |
push @tags, $self->html_tag('option', _H($result[1]), \%attributes);
|
|
71 | 76 |
} |
72 | 77 |
} |
73 | 78 |
|
Auch abrufbar als: Unified diff
Mehr Attribute HTML-escapen.