make it not possible for a post to have "queen" or "sharpened" css class without having the body replacements (through editing above the 1000 mark)
parent
a1b226117b
commit
678faa9e73
|
@ -383,10 +383,11 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
||||||
sanitized = owoify(sanitized)
|
sanitized = owoify(sanitized)
|
||||||
if author.marsify and not author.chud:
|
if author.marsify and not author.chud:
|
||||||
sanitized = marsify(sanitized)
|
sanitized = marsify(sanitized)
|
||||||
if obj.sharpened:
|
|
||||||
sanitized = sharpen(sanitized)
|
if obj.sharpened:
|
||||||
if obj.queened:
|
sanitized = sharpen(sanitized)
|
||||||
sanitized = queenify(sanitized)
|
if obj.queened:
|
||||||
|
sanitized = queenify(sanitized)
|
||||||
|
|
||||||
if '```' not in sanitized and '<pre>' not in sanitized:
|
if '```' not in sanitized and '<pre>' not in sanitized:
|
||||||
sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized)
|
sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized)
|
||||||
|
@ -681,8 +682,9 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author=
|
||||||
title = owoify(title)
|
title = owoify(title)
|
||||||
if author.marsify and not author.chud:
|
if author.marsify and not author.chud:
|
||||||
title = marsify(title)
|
title = marsify(title)
|
||||||
if obj.sharpened:
|
|
||||||
title = sharpen(title)
|
if obj.sharpened:
|
||||||
|
title = sharpen(title)
|
||||||
|
|
||||||
emojis_used = set()
|
emojis_used = set()
|
||||||
|
|
||||||
|
|
|
@ -551,6 +551,8 @@ def submit_post(v, hole=None):
|
||||||
if url == '': url = None
|
if url == '': url = None
|
||||||
|
|
||||||
flag_chudded = v.chud and hole != 'chudrama' and not (len(body) > 1000 and not v.chudded_by)
|
flag_chudded = v.chud and hole != 'chudrama' and not (len(body) > 1000 and not v.chudded_by)
|
||||||
|
flag_queened = v.queened and len(body) <= 1000
|
||||||
|
flag_sharpened = v.sharpened and len(body) <= 1000
|
||||||
|
|
||||||
p = Post(
|
p = Post(
|
||||||
private=flag_private,
|
private=flag_private,
|
||||||
|
@ -568,8 +570,8 @@ def submit_post(v, hole=None):
|
||||||
ghost=flag_ghost,
|
ghost=flag_ghost,
|
||||||
chudded=flag_chudded,
|
chudded=flag_chudded,
|
||||||
rainbowed=bool(v.rainbow),
|
rainbowed=bool(v.rainbow),
|
||||||
queened=bool(v.queen),
|
queened=flag_queened,
|
||||||
sharpened=bool(v.sharpen),
|
sharpened=flag_sharpened,
|
||||||
)
|
)
|
||||||
|
|
||||||
title_html = filter_emojis_only(title, count_emojis=True, obj=p, author=v)
|
title_html = filter_emojis_only(title, count_emojis=True, obj=p, author=v)
|
||||||
|
|
Loading…
Reference in New Issue