From dea70c715dff1f2314f172000d5b20c4da6381c5 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 30 Jul 2023 02:36:22 +0300 Subject: [PATCH] remove leftover code --- files/helpers/sanitize.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index dca351c9e..eb4961495 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -652,13 +652,10 @@ def filter_emojis_only(title, golden=True, count_emojis=False, graceful=False): title = bleach.clean(title, tags=['img','del','span'], attributes=allowed_attributes_emojis, protocols=['http','https']).replace('\n','') - if strip: - title = title.strip() - if len(title) > POST_TITLE_HTML_LENGTH_LIMIT and not graceful: abort(400) else: - return title + return title.strip() def normalize_url(url): url = reddit_domain_regex.sub(r'\1https://old.reddit.com/\3/', url)