rel="nofollow noopener"

master
Aevann 2024-08-11 02:26:27 +03:00
parent eeb2b9bff1
commit 784c4c136e
2 changed files with 2 additions and 2 deletions

View File

@ -598,7 +598,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
embed = BeautifulSoup(embed, 'lxml')
link.replaceWith(embed)
elif link["href"].startswith('https://old.reddit.com/r/') and not link["href"].endswith('/new/'):
embed = f'<a class="reddit-embed-bq" data-embed-height="500" href="{link["href"]}">{link["href"]}</a>'
embed = f'<a rel="nofollow noopener" class="reddit-embed-bq" data-embed-height="500" href="{link["href"]}">{link["href"]}</a>'
embed = BeautifulSoup(embed, 'lxml')
link.replaceWith(embed)

View File

@ -143,7 +143,7 @@
{% if p.url %}
{% if p.url.startswith('https://old.reddit.com/r/') and not p.url.endswith('/new/') %}
<a class="reddit-embed-bq" data-embed-height="500" href="{{p.url}}">{{p.url}}</a>
<a rel="nofollow noopener" class="reddit-embed-bq" data-embed-height="500" href="{{p.url}}">{{p.url}}</a>
{% elif p.url.startswith('https://tiktok.com/@') %}
{% set id = p.url.split('/video/')[1] %}
{% if id %}