Revision 86e54d7f
Von Moritz Bunkus vor fast 3 Jahren hinzugefügt
SL/Presenter/Tag.pm | ||
---|---|---|
10 | 10 |
our @EXPORT_OK = qw( |
11 | 11 |
html_tag input_tag hidden_tag javascript man_days_tag name_to_id select_tag |
12 | 12 |
checkbox_tag button_tag submit_tag ajax_submit_tag input_number_tag |
13 |
stringify_attributes restricted_html textarea_tag link_tag date_tag
|
|
13 |
stringify_attributes textarea_tag link_tag date_tag |
|
14 | 14 |
div_tag radio_button_tag img_tag); |
15 | 15 |
our %EXPORT_TAGS = (ALL => \@EXPORT_OK); |
16 | 16 |
|
... | ... | |
369 | 369 |
|
370 | 370 |
my $html_restricter; |
371 | 371 |
|
372 |
sub restricted_html { |
|
373 |
my ($value) = @_; |
|
374 |
|
|
375 |
$html_restricter ||= SL::HTML::Restrict->create; |
|
376 |
return $html_restricter->process($value); |
|
377 |
} |
|
378 |
|
|
379 | 372 |
sub textarea_tag { |
380 | 373 |
my ($name, $content, %attributes) = @_; |
381 | 374 |
|
... | ... | |
500 | 493 |
HTML tag attributes. Keys and values are HTML escaped even though keys |
501 | 494 |
must not contain non-ASCII characters for browsers to accept them. |
502 | 495 |
|
503 |
=item C<restricted_html $html> |
|
504 |
|
|
505 |
Returns HTML stripped of unknown tags. See L<SL::HTML::Restrict>. |
|
506 |
|
|
507 | 496 |
=back |
508 | 497 |
|
509 | 498 |
=head2 HIGH-LEVEL FUNCTIONS |
Auch abrufbar als: Unified diff
Presenter: eine Instanz der doppelten Funktion restricted_html entfernt