Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
scripts/flatpak: Escape XML characters in convert-release-notes.py (#13801)
Joey Richesd3f869acd82c
diff --git a/script/flatpak/convert-release-notes.py b/script/flatpak/convert-release-notes.pyindex 49d57a2286e..2c29cbacbfd 100644--- a/script/flatpak/convert-release-notes.py+++ b/script/flatpak/convert-release-notes.py@@ -1,18 +1,18 @@+import osimport reimport requestsimport sysimport textwrap-import os++from html import escapedef clean_line(line: str, in_code_fence: bool) -> str:- line = re.sub(r"<", "<", line)- line = re.sub(r">", ">", line)line = re.sub(r"\(\[(#\d+)\]\([\w|\d\:|\/|\.|\-|_]*\)\)", lambda match: f"[{match.group(1)}]", line)line = re.sub(r"\[(#\d+)\]\([\w|\d\:|\/|\.|\-|_]*\)", lambda match: f"[{match.group(1)}]", line)if not in_code_fence:line = line.strip()- return line+ return escape(line)def convert_body(body: str) -> str: