mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Fix comment length checking
This commit is contained in:
parent
a8a3067ac9
commit
e931d6a88b
@ -199,7 +199,7 @@ def view(id):
|
||||
flash("Please wait before commenting again", "danger")
|
||||
return redirect(thread.getViewURL())
|
||||
|
||||
if len(comment) <= 500 and len(comment) > 3:
|
||||
if len(comment) <= 2000 and len(comment) > 3:
|
||||
reply = ThreadReply()
|
||||
reply.author = current_user
|
||||
reply.comment = comment
|
||||
@ -216,7 +216,7 @@ def view(id):
|
||||
return redirect(thread.getViewURL())
|
||||
|
||||
else:
|
||||
flash("Comment needs to be between 3 and 500 characters.")
|
||||
flash("Comment needs to be between 3 and 2000 characters.")
|
||||
|
||||
return render_template("threads/view.html", thread=thread)
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
||||
<input class="form-control" id="title" name="title" required="" type="text">
|
||||
</div>
|
||||
|
||||
<textarea class="form-control markdown" required maxlength=500 name="comment"></textarea><br />
|
||||
<textarea class="form-control markdown" required maxlength=2000 name="comment"></textarea><br />
|
||||
<input class="btn btn-primary" type="submit" value="{{ _('Post Review') }}" />
|
||||
</form>
|
||||
</div>
|
||||
|
@ -85,7 +85,7 @@
|
||||
{% else %}
|
||||
<form method="post" action="{{ url_for('threads.view', id=thread.id)}}" class="card-body">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<textarea class="form-control markdown" required maxlength=500 name="comment"></textarea><br />
|
||||
<textarea class="form-control markdown" required maxlength=2000 name="comment"></textarea><br />
|
||||
<input class="btn btn-primary" type="submit" value="Comment" />
|
||||
</form>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user