fds
This commit is contained in:
parent
9b96c308f6
commit
fc45d79685
3 changed files with 7 additions and 3 deletions
|
@ -407,6 +407,8 @@ def message2(v, username):
|
|||
|
||||
message = request.values.get("message", "").strip()[:1000].strip()
|
||||
|
||||
if not message: return {"error": "message is empty"}
|
||||
|
||||
if 'linkedin.com' in message: return {"error": "This domain 'linkedin.com' is banned."}, 403
|
||||
|
||||
message = re.sub('!\[\]\((.*?)\)', r'\1', message)
|
||||
|
@ -467,6 +469,8 @@ def messagereply(v):
|
|||
|
||||
message = request.values.get("body", "").strip()[:1000].strip()
|
||||
|
||||
if not message: return {"error": "message is empty"}
|
||||
|
||||
if 'linkedin.com' in message: return {"error": "this domain 'linkedin.com' is banned"}
|
||||
|
||||
message = re.sub('!\[\]\((.*?)\)', r'\1', message)
|
||||
|
|
|
@ -525,7 +525,7 @@
|
|||
<div id="comment-form-space-{{c.id}}" class="comment-write collapsed child">
|
||||
<form id="reply-to-message-{{c.id}}" action="/reply" method="post" class="input-group" enctype="multipart/form-data">
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<textarea autocomplete="off" maxlength="10000" name="body" form="reply-to-t3_{{c.id}}" data-id="{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3" oninput="markdown('reply-form-body-{{c.id}}', 'message-reply-{{c.id}}')"></textarea>
|
||||
<textarea autocomplete="off" minlength="1" maxlength="1000" name="body" form="reply-to-t3_{{c.id}}" data-id="{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3" oninput="markdown('reply-form-body-{{c.id}}', 'message-reply-{{c.id}}')"></textarea>
|
||||
<div class="comment-format" id="comment-format-bar-{{c.id}}">
|
||||
<label class="btn btn-secondary format m-0" for="gif-reply-btn-{{c.id}}">
|
||||
<i id="emoji-reply-btn-{{c.id}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.id}}')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Add Emoji"></i>
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
<form class="d-none profile-toggleable" id="message" action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<pre></pre>
|
||||
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" maxlength="1000" class="form-control b2" oninput="markdown('input-message', 'message-preview')" required></textarea>
|
||||
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" minlength="1" maxlength="1000" class="form-control b2" oninput="markdown('input-message', 'message-preview')" required></textarea>
|
||||
<pre></pre>
|
||||
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('input-message')" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bold"></pre>
|
||||
|
||||
|
@ -464,7 +464,7 @@
|
|||
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
|
||||
<pre></pre>
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" maxlength="1000" class="form-control" oninput="markdown('input-message-mobile', 'message-preview-mobile')" required></textarea>
|
||||
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" minlength="1" maxlength="1000" class="form-control" oninput="markdown('input-message-mobile', 'message-preview-mobile')" required></textarea>
|
||||
<pre></pre>
|
||||
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('input-message-mobile')" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bold"></pre>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue