diff --git a/files/helpers/bleach_body.py b/files/helpers/bleach_body.py index 51e5761a8..714e73fda 100644 --- a/files/helpers/bleach_body.py +++ b/files/helpers/bleach_body.py @@ -91,7 +91,7 @@ def bleach_body_html(body_html, runtime=False): filters=[ partial( LinkifyFilter, - skip_tags=["pre"], + skip_tags=["pre","code"], parse_email=False, url_re=sanitize_url_regex ) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index b8ff2d294..9af486c0e 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -658,7 +658,7 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author= filters=[ partial( LinkifyFilter, - skip_tags=["pre"], + skip_tags=["pre","code"], parse_email=False, url_re=sanitize_url_regex )