<<

NAME

MT::Sanitize - Sanitize HTML for Safety

SYNOPSIS

    use MT::Sanitize;
    my $html = <<HTML;
    <a name="foo.html" onclick="evilJS()">foolink</a>
    HTML
    my $str = MT::Sanitize->sanitize($html, 'a href');
    ## $str is now <a href="foo.html">foolink</a>

METHODS

parse_spec($tags)

Return a hash reference of allowed tags and their attributes.

sanitize($text, [0|1|\%args])

"Sanitize" the text with the rules defined in args (or by the parse_spec method if rules are not provided).

AUTHOR & COPYRIGHT

Please see "AUTHOR & COPYRIGHT" in MT.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 217:

=cut found outside a pod block. Skipping to next block.

<<