From 3b8173e94b9228b0761e45174190b237b41d1db8 Mon Sep 17 00:00:00 2001 From: Irma Lahtinen Date: Tue, 12 Dec 2023 01:19:38 +0200 Subject: Adding "link to clipboard" functionality and forcing questions to consist printable characters. --- routes/question.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/question.py b/routes/question.py index 6965529..a56c0db 100644 --- a/routes/question.py +++ b/routes/question.py @@ -37,7 +37,7 @@ def new_question(): return redirect("/#create") for entry in [question, neg_ans, pos_ans]: - if len(entry) < 2 or len(entry) > 80: + if len(entry.strip()) < 2 or len(entry.strip()) > 80: session["alert"] = "Syötteiden tulee olla 2-80 merkkiä pitkiä" return redirect("/#question") -- cgit v1.2.3