make it look like a normal link

master
Aevann 2024-08-11 02:25:13 +03:00
parent c73c0913d2
commit eeb2b9bff1
2 changed files with 2 additions and 4 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'<blockquote class="reddit-embed-bq"><a href="{link["href"]}">{link["href"]}</a></blockquote>'
embed = f'<a class="reddit-embed-bq" data-embed-height="500" href="{link["href"]}">{link["href"]}</a>'
embed = BeautifulSoup(embed, 'lxml')
link.replaceWith(embed)

View File

@ -143,9 +143,7 @@
{% if p.url %}
{% if p.url.startswith('https://old.reddit.com/r/') and not p.url.endswith('/new/') %}
<blockquote class="reddit-embed-bq" data-embed-height="500">
<a href="{{p.url}}">{{p.url}}</a>
</blockquote>
<a 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 %}