From 6ec0d25034767231bfdc5f08057e368e58361505 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 2 Jul 2022 12:12:52 +0200 Subject: [PATCH] strip sanitized text --- files/helpers/sanitize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index b51c02403..4d6e98711 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -346,7 +346,7 @@ def sanitize(sanitized, edit=False): signal.alarm(0) - return sanitized + return sanitized.strip() @@ -392,7 +392,7 @@ def filter_emojis_only(title, edit=False, graceful=False): signal.alarm(0) if len(title) > 1500 and not graceful: abort(400) - else: return title.replace('\n','') + else: return title.replace('\n','').strip() def normalize_url(url): url = reddit_domain_regex.sub(r'\1https://old.reddit.com/r/', url)