the notificaiton template itself should be converted to <br> html from plaintext

This commit is contained in:
dgtlmoon
2024-12-13 10:43:04 +01:00
parent d88da3cd88
commit 69c3d5a3fb
2 changed files with 3 additions and 1 deletions

View File

@@ -77,6 +77,9 @@ def process_notification(n_object, datastore):
# Get the notification body from datastore
n_body = jinja_render(template_str=n_object.get('notification_body', ''), **notification_parameters)
if n_object.get('notification_format', '').startswith('HTML'):
n_body = n_body.replace("\n", '<br>')
n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters)
url = url.strip()

View File

@@ -442,7 +442,6 @@ def test_global_send_test_notification(client, live_server, measure_memory_usage
assert b"Error: You must have atleast one watch configured for 'test notification' to work" in res.data
#2510
def test_html_color_notifications(client, live_server, measure_memory_usage):
#live_server_setup(live_server)