From dd5f63814917576e6eb57bf7c6d8decf4dce3961 Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Sun, 19 Apr 2026 21:55:38 +0200 Subject: [PATCH] chore: commenting of sanizier.py --- src/sanitizer.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sanitizer.py b/src/sanitizer.py index f533354..a71f217 100644 --- a/src/sanitizer.py +++ b/src/sanitizer.py @@ -1,3 +1,9 @@ +# +# src/sanitizer.py +# AGPL-3.0 - saningi-html +# + + import bleach from profiles import STRICT, LOOSE from log.Logger import * @@ -9,6 +15,15 @@ PROFILES = { } def sanitize(html : str, mode : str) -> str: + """ + Arguments: + html : str -> input html + mode : str -> the defined mode which is from profiles.py ; or PROFILES variable + + Functionality: + This function takes in HTML sanitzies it with bleach and returns clean HTML + """ + # this should be used with caution! it is for trusted # individuals only if mode == "passthrough":