fix: sanitize daily report HTML for Telegram parse_mode
Strip div/br tags unsupported by Telegram API; reports still store UI HTML in details Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,12 @@ def test_html_escape_special_chars():
|
||||
assert html_escape("a<b>&") == "a<b>&"
|
||||
|
||||
|
||||
def test_sanitize_telegram_html_keeps_bold():
|
||||
from app.services.telegram_templates import sanitize_telegram_html
|
||||
|
||||
assert sanitize_telegram_html("<b>title</b><br>line") == "<b>title</b>\nline"
|
||||
|
||||
|
||||
def test_rdp_failed_template_includes_user_ip_logon():
|
||||
host = Host(hostname="K6A-DC3", display_name="UNMS Kalina", os_family="windows")
|
||||
event = Event(
|
||||
|
||||
Reference in New Issue
Block a user