same as last commit

master
Aevann 2023-01-21 02:40:32 +02:00
parent c380572c13
commit 96eacd73df
1 changed files with 4 additions and 2 deletions

View File

@ -410,8 +410,10 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
if '<pre>' not in sanitized and not sidebar:
sanitized = sanitized.replace('\n','')
if showmore and len(sanitized) > 3500 or sanitized.count('<') > 15:
sanitized = showmore_regex.sub(r'\1<p><button class="showmore">SHOW MORE</button></p><d class="d-none">\4</d>', sanitized, count=1)
# if showmore and len(sanitized) > 3500 or sanitized.count('<') > 15:
# sanitized = showmore_regex.sub(r'\1<p><button class="showmore">SHOW MORE</button></p><d class="d-none">\4</d>', sanitized, count=1)
if showmore and len(sanitized) > 3500:
sanitized = showmore_regex.sub(r'\1<p><button class="showmore">SHOW MORE</button></p><d class="d-none">\2</d>', sanitized, count=1)
return sanitized.strip()