Échapper les noms de dalles injectés dans l'interface (HTML et <script> inline)
This commit is contained in:
@ -1045,7 +1045,8 @@ def _merge_remote_index():
|
||||
try:
|
||||
html = html_path.read_text(encoding="utf-8")
|
||||
new_html = re.sub(r"const TILES = \[.*?\];",
|
||||
"const TILES = " + json.dumps(merged, ensure_ascii=False) + ";",
|
||||
"const TILES = " + json.dumps(merged, ensure_ascii=False)
|
||||
.replace("</", "<\\/") + ";",
|
||||
html, count=1, flags=re.S)
|
||||
if new_html != html:
|
||||
html_path.write_text(new_html, encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user