Per-feed content filters: HTML sanitization, category allow/block lists,
image stripping, and summary truncation. The sanitizer removes dangerous
tags and style attributes but the default configuration does not filter
attribute-based injection vectors such as on* event handlers or
javascript: URIs.
Summary
Functions
Applies the merged filter map to a list of Exoplanet.Post structs.
Built-in default filter map. Used by Exoplanet.Config as the baseline
for default_filters and as the starting point that user-supplied
default_filters are merged onto.
Merges a per-feed filter map onto a default filter map.
Types
Functions
@spec apply([Exoplanet.Post.t()], t()) :: [Exoplanet.Post.t()]
Applies the merged filter map to a list of Exoplanet.Post structs.
Returns the filtered list. Posts dropped by category filters are removed
entirely. The sanitize_html and strip_images filters modify each post's
:body and :summary. The excerpt_length filter modifies only :summary.
Sanitization runs first, then image stripping, then excerpt generation.
When both HTML filters are enabled they share a single tree walk.
@spec defaults() :: t()
Built-in default filter map. Used by Exoplanet.Config as the baseline
for default_filters and as the starting point that user-supplied
default_filters are merged onto.
Merges a per-feed filter map onto a default filter map.
allow_categories and block_categories REPLACE the default value when
the per-feed map sets them to a list. Other keys override field-by-field.
Per-feed keys set to nil leave the default in place.