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":