forked from MarseyWorld/MarseyWorld
same as last commit
parent
c380572c13
commit
96eacd73df
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue