From 2be4b9dde7d49c6e359153586e713a721a6dd680 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 23 Feb 2024 17:17:59 +0200 Subject: [PATCH] fix this https://rdrama.net/notification/5998164#context --- files/helpers/bleach_body.py | 2 +- files/helpers/sanitize.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 )