forked from rDrama/rDrama
disallow 2 possible bypasses i thought of on bed
parent
d3c1329664
commit
8df3135ad0
|
@ -532,6 +532,16 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_emojis=
|
||||||
unlinkfy()
|
unlinkfy()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
#don't allow something like this [@Aevann2](https://iplogger.org/1fRKk7)
|
||||||
|
if str(link.string).startswith('@') and not href.startswith('/'):
|
||||||
|
unlinkfy()
|
||||||
|
continue
|
||||||
|
|
||||||
|
#don't allow something like this [!jannies](https://iplogger.org/1fRKk7)
|
||||||
|
if str(link.string).startswith('!') and not href.startswith('/'):
|
||||||
|
unlinkfy()
|
||||||
|
continue
|
||||||
|
|
||||||
#don't allow something like this [https://rԁrama.net/leaderboard](https://iplogger.org/1fRKk7)
|
#don't allow something like this [https://rԁrama.net/leaderboard](https://iplogger.org/1fRKk7)
|
||||||
if not snappy and tldextract.extract(str(link.string)).registered_domain:
|
if not snappy and tldextract.extract(str(link.string)).registered_domain:
|
||||||
link.string = href
|
link.string = href
|
||||||
|
|
Loading…
Reference in New Issue