diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py index 121b44580d7..11792d6225c 100644 --- a/changedetectionio/forms.py +++ b/changedetectionio/forms.py @@ -308,8 +308,12 @@ def __call__(self, form, field): # so that the custom endpoints are registered from changedetectionio.apprise_plugin import apprise_custom_api_call_wrapper for server_url in field.data: - if not apobj.add(server_url): - message = field.gettext('\'%s\' is not a valid AppRise URL.' % (server_url)) + url = server_url.strip() + if url.startswith("#"): + continue + + if not apobj.add(url): + message = field.gettext('\'%s\' is not a valid AppRise URL.' % (url)) raise ValidationError(message) class ValidateJinja2Template(object): diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index a7328857315..42dcdce7341 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -79,6 +79,10 @@ def process_notification(n_object, datastore): n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters) url = url.strip() + if url.startswith('#'): + logger.trace(f"Skipping commented out notification URL - {url}") + continue + if not url: logger.warning(f"Process Notification: skipping empty notification URL.") continue