File: README

package info (click to toggle)
libhtml-stripscripts-parser-perl 1.03-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 116 kB
  • sloc: perl: 35; makefile: 2
file content (71 lines) | stat: -rw-r--r-- 2,119 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
NAME
    HTML::StripScripts::Parser - XSS filter using HTML::Parser

SYNOPSIS
      use HTML::StripScripts::Parser;

      my $hss = HTML::StripScripts::Parser->new(
           {
               Context => 'Document',
               Rules   => { ... },
           },
           strict_comment => 1,
           strict_names   => 1,
      );

      $hss->parse_file("foo.html");

      print $hss->filtered_document;

DESCRIPTION

	
    This class subclasses both HTML::StripScripts and HTML::Parser, adding
    the input methods that HTML::Parser provides to HTML::StripScripts.

    See HTML::StripScripts and HTML::Parser.

CONSTRUCTORS
    new ( CONFIG, [PARSER_OPTIONS] )
        Creates a new "HTML::StripScripts::Parser" object, and invokes the
        HTML::Parser init() method so that tags are fed to the correct
        HTML::StripScripts methods.

        The CONFIG parameter has the same semantics as the CONFIG parameter
        to the HTML::StripScripts constructor.

        Any PARSER_OPTIONS supplied will be passed on to the HTML::Parser
        init method, allowing you to influence the way the input is parsed.

        You cannot use PARSER_OPTIONS to set HTML::Parser event handlers,
        since "HTML::StripScripts::Parser" uses all of the event hooks
        itself.

METHODS
    See HTML::Parser for input methods, HTML::StripScripts for output
    methods.

SUBCLASSING
    The "HTML::StripScripts::Parser" class is subclassable. Filter objects
    are plain hashes. The hss_init() method takes the same arguments as
    new(), and calls the initialization methods of both "HTML::StripScripts"
    and "HTML::Parser".

    See "SUBCLASSING" in HTML::StripScripts and "SUBCLASSING" in
    HTML::Parser.

SEE ALSO
    HTML::StripScripts, HTML::Parser

AUTHOR
	Original author Nick Cleaton E<lt>nick@cleaton.netE<gt>
	New code added and module maintained by Clinton Gormley
	E<lt>clint@traveljury.comE<gt>


COPYRIGHT
    Copyright (C) 2003 Nick Cleaton. All Rights Reserved.

    This module is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.