diff --git a/changedetectionio/html_tools.py b/changedetectionio/html_tools.py index 4f500e74..d251aebc 100644 --- a/changedetectionio/html_tools.py +++ b/changedetectionio/html_tools.py @@ -140,7 +140,7 @@ def strip_ignore_text(content, wordlist, mode="content"): except Exception as e: continue - if not regex_matches and not any(skip_text in line for skip_text in ignore): + if not regex_matches and not any(skip_text.lower() in line.lower() for skip_text in ignore): output.append(line.encode('utf8')) else: ignored_line_numbers.append(i) diff --git a/changedetectionio/tests/test_ignore_text.py b/changedetectionio/tests/test_ignore_text.py index 3acacb34..022c4f56 100644 --- a/changedetectionio/tests/test_ignore_text.py +++ b/changedetectionio/tests/test_ignore_text.py @@ -70,7 +70,7 @@ def set_modified_ignore_response(): Some initial text

Which is across multiple lines

-

ZZZZZ

+

ZZZZz


So let's see what happens.
@@ -85,7 +85,8 @@ def set_modified_ignore_response(): def test_check_ignore_text_functionality(client, live_server): sleep_time_for_fetch_thread = 3 - ignore_text = "XXXXX\r\nYYYYY\r\nZZZZZ\r\nnew ignore stuff" + # Use a mix of case in ZzZ to prove it works case-insensitive. + ignore_text = "XXXXX\r\nYYYYY\r\nzZzZZ\r\nnew ignore stuff" set_original_ignore_response() # Give the endpoint time to spin up