Allow superscript and subscript in sanitized HTML.

This is useful for READMEs and the like -- the tags `sup` and `sub` are
not harmful, and allow for things like footnotes.

Signed-off-by: Julia DeMille <me@jdemille.com>
This commit is contained in:
Julia DeMille 2024-01-08 14:46:47 -06:00 committed by Conrad Hoffmann
parent d293b4b434
commit b4cdcb0d60
1 changed files with 1 additions and 0 deletions

View File

@ -215,6 +215,7 @@ _sanitizer = bleach.sanitizer.Cleaner(
"details", "summary",
"abbr", "dfn",
"del",
"sup", "sub"
],
attributes={**bleach.sanitizer.ALLOWED_ATTRIBUTES, **_sanitizer_attrs},
protocols=[