mirror of
https://github.com/Cockatrice/Magic-Spoiler.git
synced 2026-08-24 02:14:51 -05:00
remove control characters from xml
This commit is contained in:
@@ -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(" "))}}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user