fix issue with code blocks

master
Aevann1 2022-07-01 01:01:10 +02:00
parent d9844231c7
commit cba02b9e4b
1 changed files with 2 additions and 1 deletions

View File

@ -335,7 +335,8 @@ def sanitize(sanitized, edit=False):
if bans: abort(403, description=f"Remove the banned domains {bans} and try again!") if bans: abort(403, description=f"Remove the banned domains {bans} and try again!")
sanitized = sanitized.replace('\n','') if '<pre>' not in sanitized:
sanitized = sanitized.replace('\n','')
if len(sanitized) > 5000: if len(sanitized) > 5000:
sanitized = showmore_regex.sub(r'\1<p><button class="btn btn-primary" onclick="showmore()">SHOW MORE</button></p><div class="d-none">\2</div>', sanitized) sanitized = showmore_regex.sub(r'\1<p><button class="btn btn-primary" onclick="showmore()">SHOW MORE</button></p><div class="d-none">\2</div>', sanitized)