Mail::SpamAssassin::Pyzor::Digest::StripHtml - Pyzor HTML-stripping module
Contents
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.
That said, all known divergences between pyzor and this library involve invalid HTML as input.
Please open bug reports for any divergences you identify, particularly if the input is valid HTML.
Description
This module attempts to duplicate pyzor's HTML-stripping logic.
Functions
$stripped=strip($HTML)
Give it some HTML, and it'll give back the stripped text.
In general, the stripping consists of removing tags as well as "<script>" and "<style>" elements;
however, it also removes HTML entities.
This tries very hard to duplicate pyzor's behavior with invalid HTML.
perl v5.40.1 2025-06-26 Mail::SpamAssas...gest::StripHtml(3pm)
Name
Mail::SpamAssassin::Pyzor::Digest::StripHtml - Pyzor HTML-stripping module
Synopsis
my $stripped = Mail::SpamAssassin::Pyzor::Digest::StripHtml::strip($html);
