forked from rDrama/rDrama
fdMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
5221cae7c6
|
@ -13,7 +13,7 @@ def process_audio(file):
|
|||
name = f'/audio/{time.time()}'.replace('.','') + '.' + file.filename.split('.')[-1].lower()
|
||||
file.save(name)
|
||||
|
||||
if SITE_NAME == 'WPD' or os.stat(name).st_size > 8 * 1024 * 1024:
|
||||
if os.stat(name).st_size > 8 * 1024 * 1024:
|
||||
with open(name, 'rb') as f:
|
||||
os.remove(name)
|
||||
req = requests.request("POST", "https://pomf2.lain.la/upload.php", files={'files[]': f}, timeout=20).json()
|
||||
|
@ -35,7 +35,7 @@ def process_video(file):
|
|||
os.remove(old)
|
||||
|
||||
size = os.stat(new).st_size
|
||||
if SITE_NAME == 'WPD' or os.stat(new).st_size > 8 * 1024 * 1024:
|
||||
if os.stat(new).st_size > 8 * 1024 * 1024:
|
||||
with open(new, 'rb') as f:
|
||||
os.remove(new)
|
||||
req = requests.request("POST", "https://pomf2.lain.la/upload.php", files={'files[]': f}, timeout=20).json()
|
||||
|
|
|
@ -164,7 +164,7 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
|
|||
signal.signal(signal.SIGALRM, handler)
|
||||
signal.alarm(1)
|
||||
|
||||
if not sanitized.startswith('```') and not sanitized.startswith('<pre>'):
|
||||
if '```' not in sanitized and '<pre>' not in sanitized:
|
||||
sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized)
|
||||
|
||||
sanitized = image_regex.sub(r'\1![](\2)\4', sanitized)
|
||||
|
|
|
@ -822,7 +822,7 @@
|
|||
<div class="h6">We're sorry something here is wrong.</div>
|
||||
<small class="form-text text-muted">Please enter a reason for reporting below.</small>
|
||||
<pre></pre>
|
||||
<input autocomplete="off" maxlength="100" id="reason-comment" class="form-control">
|
||||
<input autocomplete="off" maxlength="100" id="reason_comment" class="form-control">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
|
||||
|
@ -846,7 +846,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/assets/js/marked.js?v=256"></script>
|
||||
<script src="/assets/js/comments_v.js?v=270"></script>
|
||||
<script src="/assets/js/comments_v.js?v=271"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/assets/js/clipboard.js?v=250"></script>
|
||||
|
|
|
@ -32,4 +32,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/report_post_modal.js?v=241"></script>
|
||||
<script src="/assets/js/report_post_modal.js?v=242"></script>
|
Loading…
Reference in New Issue