Potential fix for code scanning alert no. 45: Bad HTML filtering regexp

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Xin Jin
2025-07-09 11:20:27 -07:00
committed by GitHub
co-authored by Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent 0135af8d67
commit ae1ed77840
+1 -1
View File
@@ -46,7 +46,7 @@ def _clean_markdown(content: str) -> str:
content = re.sub(r'^---\n.*?\n---\n', '', content, flags=re.DOTALL)
# Remove script tags
content = re.sub(r'<script[^>]*>.*?</script>', '', content, flags=re.DOTALL)
content = re.sub(r'<script[^>]*>.*?</script>', '', content, flags=re.DOTALL | re.IGNORECASE)
# Remove style tags
content = re.sub(r'<style[^>]*>.*?</style>', '', content, flags=re.DOTALL)