HTML::StripScripts::LibXML is an XSS filter that outputs a LibXML Document or DocumentFragment.
SYNOPSIS
use HTML::StripScripts::LibXML();
my $hss = HTML::StripScripts::LibXML->new(
{
Context => 'Document', ## HTML::StripScripts configuration
Rules => { ... },
},
strict_comment => 1, ## HTML::Parser options
strict_names => 1,
);
$hss->parse_file("foo.html");
$xml_doc = $hss->filtered_document;
OR
$xml_doc = $hss->filter_html($html);
This class provides an easy interface to HTML::StripScripts, using HTML::Parser to parse the HTML, and returns an XML::LibXML::Document or XML::LibXML::DocumentFragment.
See HTML::Parser for details of how to customise how the raw HTML is parsed into tags, and HTML::StripScripts for details of how to customise the way those tags are filtered. This module is a subclass of HTML::StripScripts::Parser.
Product's homepage
Requirements:
· Perl