From a2fac935482d39c93006de023fdb45a7f0284097 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 31 Aug 2022 15:33:14 +0200 Subject: [PATCH] Handle browser \r\n --- changedetectionio/store.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/changedetectionio/store.py b/changedetectionio/store.py index 40a5785f..db9d31da 100644 --- a/changedetectionio/store.py +++ b/changedetectionio/store.py @@ -553,9 +553,10 @@ class ChangeDetectionStore: for uuid, watch in self.data['watching'].items(): try: # If it's all the same to the system settings, then prefer system notification settings - if watch.get('notification_body') == default_notification_body and \ + # include \r\n -> \n incase they already hit submit and the browser put \r in + if watch.get('notification_body').replace('\r\n', '\n') == default_notification_body.replace('\r\n', '\n') and \ watch.get('notification_format') == default_notification_format and \ - watch.get('notification_title') == default_notification_title and \ + watch.get('notification_title').replace('\r\n', '\n') == default_notification_title.replace('\r\n', '\n') and \ watch.get('notification_urls') == self.__data['settings']['application']['notification_urls']: watch['notification_use_default'] = True else: