Handle browser \r\n

This commit is contained in:
dgtlmoon
2022-08-31 15:33:14 +02:00
parent 09c9239aab
commit a2fac93548
+3 -2
View File
@@ -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: