From 33a3d2cfb6a1979c9d92de4696fa0d9904d8c6b3 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 28 Oct 2025 11:06:23 +0100 Subject: [PATCH] Handle format= in apprise URLs --- changedetectionio/notification/handler.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changedetectionio/notification/handler.py b/changedetectionio/notification/handler.py index eba35b710..63f98b8fc 100644 --- a/changedetectionio/notification/handler.py +++ b/changedetectionio/notification/handler.py @@ -360,6 +360,18 @@ def process_notification(n_object: NotificationContextData, datastore): # texty types n_body = n_body.replace(CUSTOM_LINEBREAK_PLACEHOLDER, '\r\n') + else: + # ?format was IN the apprise URL, they are kind of on their own here, we will try our best + if 'format=html' in url: + n_body = n_body.replace(CUSTOM_LINEBREAK_PLACEHOLDER, '
\r\n') + # This will also prevent apprise from doing conversion + apprise_input_format = NotifyFormat.HTML.value + requested_output_format = NotifyFormat.HTML.value + elif 'format=text' in url: + n_body = n_body.replace(CUSTOM_LINEBREAK_PLACEHOLDER, '\r\n') + apprise_input_format = NotifyFormat.TEXT.value + requested_output_format = NotifyFormat.TEXT.value + sent_objs.append({'title': n_title, 'body': n_body, 'url': url})