Expand description
URL canonicalization for LinkMarks.
The full ruleset lives in this module’s doc-comment on
canonicalize.
Determinism: given the same input URL, canonicalize returns the
same output bytes across runs, platforms, and processes. This is
the dedupe key and must be stable.
Enums§
- Canonicalize
Error - Error returned when a URL cannot be canonicalized.
Constants§
- TRACKING_
PARAMS - Tracking-parameter blocklist. Lowercased. Matched as a prefix for
utm_*andmc_*, and as an exact match for the rest.
Functions§
- canonicalize
- Canonicalize a URL string.
- canonicalize_
for_ core - Convenience wrapper: canonicalize and map errors into
CoreError. - canonicalize_
with - Canonicalize using explicit per-domain preservation rules.
- is_
tracking - Returns
trueif the given (lowercased) query parameter name is a known tracking parameter.