fix links linkfied by linkfyfilter getting undone by my code

master
Aevann 2023-05-13 06:55:07 +03:00
parent e8a6203329
commit fb4f02a80b
1 changed files with 1 additions and 2 deletions

View File

@ -532,8 +532,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_emojis=
#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:
unlinkfy() link.string = href
continue
#insert target="_blank" and ref="nofollower noopener" for external link #insert target="_blank" and ref="nofollower noopener" for external link
if not href.startswith('/') and not href.startswith(f'{SITE_FULL}/'): if not href.startswith('/') and not href.startswith(f'{SITE_FULL}/'):