summaryrefslogtreecommitdiff
path: root/routes/question.py
diff options
context:
space:
mode:
authorIrma Lahtinen <ilahtine@local>2023-12-12 01:19:38 +0200
committerIrma Lahtinen <ilahtine@local>2023-12-12 01:19:38 +0200
commit3b8173e94b9228b0761e45174190b237b41d1db8 (patch)
treef94bc6edf214ae3557b1a5d3c22132e64098778e /routes/question.py
parent11ee6577a359862875936fd24b41d141b30ad0cf (diff)
Adding "link to clipboard" functionality and forcing questions to consist printable characters.
Diffstat (limited to 'routes/question.py')
-rw-r--r--routes/question.py2
1 files changed, 1 insertions, 1 deletions
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")