forked from rDrama/rDrama
fix 500 and add r*pe to the bad words filter
parent
5f8a27636e
commit
731c0cc83c
|
@ -130,6 +130,7 @@ PROFANITIES = {
|
|||
'cum': ['c*m'],
|
||||
'orgasm': ['sexual climax'],
|
||||
'toilet': ['potty'],
|
||||
'rape': ['r*pe'],
|
||||
}
|
||||
|
||||
if SITE_NAME == 'rDrama':
|
||||
|
|
|
@ -119,7 +119,7 @@ def sub_matcher(match, upper=False, replace_with:Union[dict[str, str], dict[str,
|
|||
if match.group(0).startswith('<'):
|
||||
return match.group(0)
|
||||
else:
|
||||
repl = replace_with[match.group(0).lower()]
|
||||
repl = replace_with[match.group(1).lower()]
|
||||
if not isinstance(repl, str):
|
||||
repl = random.choice(repl)
|
||||
return repl if not upper or "<img" in repl else repl.upper()
|
||||
|
|
Loading…
Reference in New Issue