forked from MarseyWorld/MarseyWorld
make it look like a normal link
parent
c73c0913d2
commit
eeb2b9bff1
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue