.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::SpamAssassin::Pyzor::Digest::StripHtml 3pm" .TH Mail::SpamAssassin::Pyzor::Digest::StripHtml 3pm 2024-04-02 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::SpamAssassin::Pyzor::Digest::StripHtml \- Pyzor HTML\-stripping module .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& my $stripped = Mail::SpamAssassin::Pyzor::Digest::StripHtml::strip($html); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module attempts to duplicate pyzor's HTML-stripping logic. .SH ACCURACY .IX Header "ACCURACY" This library cannot achieve 100%, bug-for-bug parity with pyzor because to do so would require duplicating Python's own HTML parsing library. Since that library's output has changed over time, and those changes in turn affect pyzor, it's literally impossible to arrive at a single, fully-compatible reimplementation. .PP That said, all known divergences between pyzor and this library involve invalid HTML as input. .PP Please open bug reports for any divergences you identify, particularly if the input is valid HTML. .SH FUNCTIONS .IX Header "FUNCTIONS" .ie n .SS "$stripped = strip( $HTML )" .el .SS "\f(CW$stripped\fP = strip( \f(CW$HTML\fP )" .IX Subsection "$stripped = strip( $HTML )" Give it some HTML, and it'll give back the stripped text. .PP In \fBgeneral\fR, the stripping consists of removing tags as well as \&\f(CW\*(C`