Mail::...ipHtml(3pm)

πŸ’– NAME πŸ’–

Mail::SpamAssassin::Pyzor::Digest::StripHtml β€” it's the Pyzor HTML-stripping module bestie, and it is so unserious about spam but so serious about stripping πŸ’…

(also hi, this page lives in the User Contributed Perl Documentation manual, section 3pm πŸŽ€)


✨ SYNOPSIS ✨

okay so literally one line and you're done:

my $stripped = Mail::SpamAssassin::Pyzor::Digest::StripHtml::strip($html);

that's it. that's the whole vibe πŸ¦‹


🌸 DESCRIPTION 🌸

This module attempts to duplicate pyzor's HTML-stripping logic.

no cap, that's the mission statement. it's giving "we saw pyzor do a thing and we're doing the thing too" πŸ‘‘


πŸ”₯ ACCURACY πŸ”₯

okay divas, let's have the hard conversation 🫢

This library cannot achieve 100%, bug-for-bug parity with pyzor because to do so would require duplicating Python's own HTML parsing library. and like… that library's output has changed over time? and those changes in turn affect pyzor? so it's literally impossible to arrive at a single, fully-compatible reimplementation. yeah. it's giving moving target πŸ’€

That said β€” all known divergences between pyzor and this library involve invalid HTML as input. so if your HTML is valid, you're chilling ✨

Please open bug reports for any divergences you identify, particularly if the input is valid HTML. like fr fr, if you find one involving valid HTML, that's the good stuff, tell us πŸ™ˆ


🧚 FUNCTIONS 🧚

πŸ’œ $stripped = strip( $HTML )

Give it some HTML, and it'll give back the stripped text. iconique behaviour honestly πŸ‘‘

In general, the stripping consists of removing tags as well as "<script>" and "<style>" elements; however, it also removes HTML entities. yes bestie, the &amp;-core stuff goes too 🌈

This tries very hard to duplicate pyzor's behavior with invalid HTML. like, it's trying so hard, main character energy, obsessed πŸ’…


and that's the whole page, babe ✨ β€” this was Mail::SpamAssassin::Pyzor::Digest::StripHtml, page 3pm, from the User Contributed Perl Documentation, generated with perl v5.40.1 on 2026-07-23. go strip some HTML, you ate πŸŽ€πŸ’–

πŸ“¦ where this page comes from