1Template::Plugin::HTML:U:sSetrriCpo(n3t)ributed Perl DocTuemmepnltaattei:o:nPlugin::HTML::Strip(3)
2
3
4

NAME

6       Template::Plugin::HTML::Strip - HTML::Strip filter for Template Toolkit
7

SYNOPSIS

9         [% USE HTML.Strip %]
10
11         [% FILTER html_strip %]
12         <title>People for the Preservation of Presentational Markup</title>
13         <h1>HTML::Strip - A cause for concern?</h1>
14         [% END %]
15
16         [% USE HTML.Strip 'strip'
17             striptags   = [ 'script' 'iframe' ]
18             emit_spaces = 0
19         %]
20
21         [% FILTER strip %]
22         <p>A call to arms against the removal of our elements!</p>
23         [% END %]
24

DESCRIPTION

26       This module is a Template Toolkit dynamic filter, which uses
27       HTML::Strip to remove markup (primarily HTML, but also SGML, XML, etc)
28       from filtered content during template processing.
29
30       By default, the installed filter's name is 'html_strip'.  This can be
31       changed by specifying a new name as the first positional argument
32       during plugin usage:
33
34         [% USE HTML.Strip 'strip' %]
35
36         [% '<div>Our very existence is under threat.</div>' | strip %]
37
38       The filter can optionally take configuration options, which will be
39       passed to HTML::Strip's constructor method:
40
41         [% USE HTML.Strip
42             striptags   = [ 'applet' 'strong' ]
43             emit_spaces = 0
44         %]
45
46         [% FILTER html_strip %]
47         <strong>Are we next!?</strong>
48         [% END %]
49
50       For more details on available configuration options, please refer to
51       HTML::Strip.
52

METHODS

54   init
55       Creates a dynamic filter and installs the filter under the value
56       provided for the first positional argument, otherwise uses
57       'html_strip'.
58
59   filter
60       Receives a reference to the plugin object, along with the text to be
61       filtered and configuration options.  Using HTML::Strip, returns the
62       filtered (stripped) text.
63

SEE ALSO

65       Template, HTML::Strip
66

AUTHOR

68       Geoff Simmons <gsimmons@cpan.org>
69
71       Copyright (C) 2005 Geoff Simmons
72
73       This library is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself.
75
76
77
78perl v5.28.1                      2005-12-19  Template::Plugin::HTML::Strip(3)
Impressum