From 6727d4005c7c38a6ac62241c79dfe2238120dbfc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 5 Sep 2022 03:44:38 +0200 Subject: [PATCH] better stripping syntax --- files/routes/posts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 6dd06321f..740218418 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -655,7 +655,7 @@ def is_repost(): url = urlunparse(new_url) - if url.endswith('/'): url = url[:-1] + url = url.rstrip('/') search_url = url.replace('%', '').replace('\\', '').replace('_', '\_').strip() repost = g.db.query(Submission).filter( @@ -764,7 +764,7 @@ def submit_post(v, sub=None): url = urlunparse(new_url) - if url.endswith('/'): url = url[:-1] + url = url.rstrip('/') search_url = url.replace('%', '').replace('\\', '').replace('_', '\_').strip() repost = g.db.query(Submission).filter(