From 0eae6efc6d950e4a1926c9e97df35b04bc58bbff Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 25 Feb 2024 01:06:31 +0200 Subject: [PATCH] fix old posts and comments --- files/classes/comment.py | 3 ++- files/classes/post.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index df05b713a..203002790 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -434,7 +434,8 @@ class Comment(Base): body = normalize_urls_runtime(body, v) - body = bleach_body_html(body, runtime=True) #to stop slur filters and poll options being used as a vector for html/js injection + if self.created_utc > 1706137534: + body = bleach_body_html(body, runtime=True) #to stop slur filters and poll options being used as a vector for html/js injection return body diff --git a/files/classes/post.py b/files/classes/post.py index 45700697f..a67b37a52 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -341,7 +341,8 @@ class Post(Base): body = normalize_urls_runtime(body, v) - body = bleach_body_html(body, runtime=True) #to stop slur filters and poll options being used as a vector for html/js injection + if self.created_utc > 1706137534: + body = bleach_body_html(body, runtime=True) #to stop slur filters and poll options being used as a vector for html/js injection return body