chore: commenting of sanizier.py

This commit is contained in:
2026-04-19 21:55:38 +02:00
parent 7bd1802276
commit dd5f638149
+15
View File
@@ -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":