Skip to content

Commit

Permalink
the notificaiton template itself should be converted to <br> html fro…
Browse files Browse the repository at this point in the history
…m plaintext
  • Loading branch information
dgtlmoon committed Dec 13, 2024
1 parent d88da3c commit 69c3d5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changedetectionio/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion changedetectionio/tests/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 69c3d5a

Please sign in to comment.