diff --git a/post_parser.py b/post_parser.py index 42203e5..3158dc9 100644 --- a/post_parser.py +++ b/post_parser.py @@ -3,6 +3,7 @@ import copy import re import os import json +import html from datetime import datetime from typing import Union, Dict, Any, List @@ -301,7 +302,7 @@ class PostParser: if debug: debug_message = copy.deepcopy(message) debug_json = json.dumps(debug_message, default=str, indent=2, ensure_ascii=False) - html_content.append(f'
{debug_json}
') + html_content.append(f'
{html.escape(debug_json)}
') html_content = '\n'.join(html_content) return html_content