Fix debug JSON output
This commit is contained in:
+1
-1
@@ -304,7 +304,7 @@ class PostParser:
|
||||
# Add raw JSON debug output if debug is enabled
|
||||
if debug:
|
||||
debug_json = json.dumps(message, indent=2, ensure_ascii=False, default=str)
|
||||
debug_json = html.escape(debug_json).replace('\n', '<br>').replace('\\"', '"')
|
||||
debug_json = debug_json.replace('\\', '').replace('"{', '{').replace('}"', '}').replace('\n', '<br>')
|
||||
html_content.append(f'<pre class="debug-json" style="background: #f5f5f5; padding: 10px; margin-top: 20px; overflow-x: auto; font-size: 10px; white-space: pre-wrap;">{debug_json}</pre>')
|
||||
html_content = '\n'.join(html_content)
|
||||
return html_content
|
||||
|
||||
Reference in New Issue
Block a user