• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

t/H05-Nov-2009-878712

ChangesH A D05-Nov-20091.4 KiB3624

MANIFESTH A D05-Nov-2009200 1312

META.ymlH A D05-Nov-2009574 1716

Makefile.PLH A D05-Nov-2009573 1916

Parser.pmH A D05-Nov-20094.1 KiB17035

READMEH A D28-May-20072.1 KiB7250

README

1NAME
2    HTML::StripScripts::Parser - XSS filter using HTML::Parser
3
4SYNOPSIS
5      use HTML::StripScripts::Parser;
6
7      my $hss = HTML::StripScripts::Parser->new(
8           {
9               Context => 'Document',
10               Rules   => { ... },
11           },
12           strict_comment => 1,
13           strict_names   => 1,
14      );
15
16      $hss->parse_file("foo.html");
17
18      print $hss->filtered_document;
19
20DESCRIPTION
21
22
23    This class subclasses both HTML::StripScripts and HTML::Parser, adding
24    the input methods that HTML::Parser provides to HTML::StripScripts.
25
26    See HTML::StripScripts and HTML::Parser.
27
28CONSTRUCTORS
29    new ( CONFIG, [PARSER_OPTIONS] )
30        Creates a new "HTML::StripScripts::Parser" object, and invokes the
31        HTML::Parser init() method so that tags are fed to the correct
32        HTML::StripScripts methods.
33
34        The CONFIG parameter has the same semantics as the CONFIG parameter
35        to the HTML::StripScripts constructor.
36
37        Any PARSER_OPTIONS supplied will be passed on to the HTML::Parser
38        init method, allowing you to influence the way the input is parsed.
39
40        You cannot use PARSER_OPTIONS to set HTML::Parser event handlers,
41        since "HTML::StripScripts::Parser" uses all of the event hooks
42        itself.
43
44METHODS
45    See HTML::Parser for input methods, HTML::StripScripts for output
46    methods.
47
48SUBCLASSING
49    The "HTML::StripScripts::Parser" class is subclassable. Filter objects
50    are plain hashes. The hss_init() method takes the same arguments as
51    new(), and calls the initialization methods of both "HTML::StripScripts"
52    and "HTML::Parser".
53
54    See "SUBCLASSING" in HTML::StripScripts and "SUBCLASSING" in
55    HTML::Parser.
56
57SEE ALSO
58    HTML::StripScripts, HTML::Parser
59
60AUTHOR
61	Original author Nick Cleaton E<lt>nick@cleaton.netE<gt>
62	New code added and module maintained by Clinton Gormley
63	E<lt>clint@traveljury.comE<gt>
64
65
66COPYRIGHT
67    Copyright (C) 2003 Nick Cleaton. All Rights Reserved.
68
69    This module is free software; you can redistribute it and/or modify it
70    under the same terms as Perl itself.
71
72