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

pull/2837/head
dgtlmoon 2 weeks ago
parent d88da3cd88
commit 69c3d5a3fb

@ -77,6 +77,9 @@ def process_notification(n_object, datastore):
# Get the notification body from datastore # Get the notification body from datastore
n_body = jinja_render(template_str=n_object.get('notification_body', ''), **notification_parameters) 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) n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters)
url = url.strip() url = url.strip()

@ -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 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): def test_html_color_notifications(client, live_server, measure_memory_usage):
#live_server_setup(live_server) #live_server_setup(live_server)

Loading…
Cancel
Save