From cfe5195210a4de0806903053ded8620f3671e6bd Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Tue, 12 May 2020 19:57:20 +0100 Subject: [PATCH] Updated regexp for matching Britisch and Amercian spelling. --- unsanitize-safelinks | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unsanitize-safelinks b/unsanitize-safelinks index fe4ac1f..4201d29 100755 --- a/unsanitize-safelinks +++ b/unsanitize-safelinks @@ -49,9 +49,9 @@ def sanitize_safelink(url): def remove_external_sender_warning_txt(content): warning_re = re.compile( - r'\nCAUTION: This email originated from outside of the organization. ' + r'\nCAUTION: This email originated from outside of the organi[zs]ation. ' + - r'Do not click links or open attachments unless you recognize the sender ' + r'Do not click links or open attachments unless you recogni[zs]e the sender ' + r'and know the content is safe.\n', re.MULTILINE) return re.sub(warning_re, lambda x: "", content).rstrip() @@ -76,9 +76,9 @@ def unsanitize_html(content): def remove_external_sender_warning_html(content): warning_re = re.compile( - r'CAUTION: This email originated from outside of the organization. ' + r'CAUTION: This email originated from outside of the organi[zs]ation. ' + - r'Do not click links or open attachments unless you recognize the sender ' + r'Do not click links or open attachments unless you recogni[zs]e the sender ' + r'and know the content is safe.', re.MULTILINE) soup = BeautifulSoup(content, "html.parser") for d in soup.findAll('div'):