Updated regexp for matching Britisch and Amercian spelling.
This commit is contained in:
parent
c244013483
commit
cfe5195210
|
@ -49,9 +49,9 @@ def sanitize_safelink(url):
|
||||||
|
|
||||||
def remove_external_sender_warning_txt(content):
|
def remove_external_sender_warning_txt(content):
|
||||||
warning_re = re.compile(
|
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)
|
+ r'and know the content is safe.\n', re.MULTILINE)
|
||||||
return re.sub(warning_re, lambda x: "", content).rstrip()
|
return re.sub(warning_re, lambda x: "", content).rstrip()
|
||||||
|
|
||||||
|
@ -76,9 +76,9 @@ def unsanitize_html(content):
|
||||||
|
|
||||||
def remove_external_sender_warning_html(content):
|
def remove_external_sender_warning_html(content):
|
||||||
warning_re = re.compile(
|
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)
|
+ r'and know the content is safe.', re.MULTILINE)
|
||||||
soup = BeautifulSoup(content, "html.parser")
|
soup = BeautifulSoup(content, "html.parser")
|
||||||
for d in soup.findAll('div'):
|
for d in soup.findAll('div'):
|
||||||
|
|
Loading…
Reference in New Issue