diff --git a/magic_spoiler/__main__.py b/magic_spoiler/__main__.py index 45fc6386..b1685b7f 100644 --- a/magic_spoiler/__main__.py +++ b/magic_spoiler/__main__.py @@ -21,7 +21,9 @@ SPOILER_SETS: contextvars.ContextVar = contextvars.ContextVar("SPOILER_SETS") OUTPUT_DIR = pathlib.Path("out") OUTPUT_TMP_DIR = OUTPUT_DIR.joinpath("tmp") XML_ESCAPE_TRANSLATE_MAP = str.maketrans( - {"&": "&", '"': """, "<": "<", ">": ">"} + {"&": "&", '"': """, "<": "<", ">": ">", + # remove any control characters outright + **{chr(i): "" for i in range(ord(" "))}} )