From 8b398277d16a1a62f6cb7b0dfbddf54814781bc9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 8 Dec 2021 03:54:36 +0200 Subject: [PATCH] sfdsdf --- files/helpers/sanitize.py | 13 ------------- files/templates/submission.html | 24 +++--------------------- files/templates/submission_listing.html | 12 ++---------- 3 files changed, 5 insertions(+), 44 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 10e8592c8..0f8c832c4 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -229,22 +229,9 @@ def sanitize(sanitized, noimages=False): htmlsource += '">' sanitized = sanitized.replace(replacing, htmlsource) - - for i in re.finditer('{url}' - htmlsource = f'' - sanitized = sanitized.replace(replacing, htmlsource) - for i in re.finditer('

(https:.*?\.mp4)

', sanitized): sanitized = sanitized.replace(i.group(0), f'

') - for i in re.finditer('{url}' - htmlsource = f'' - sanitized = sanitized.replace(replacing, htmlsource) - for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]: sanitized = sanitized.replace(rd, "https://old.reddit.com/") diff --git a/files/templates/submission.html b/files/templates/submission.html index ddd1e9f95..fba36ea40 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -415,19 +415,7 @@

{% if p.realurl(v) %} - {% if p.url.startswith('https://streamable.com/e/') %} -
-

-							{% elif p.domain == 'open.spotify.com' %}
-								{% if "spotify.com/embed/" in p.realurl(v) %}
-									{% set streamurl=p.realurl(v) %}
-								{% else %}
-									{% set streamurl=p.realurl(v).replace("spotify.com", "spotify.com/embed") %}
-								{% endif %}
-								
-								

-
-							{% elif not p.embed_url and not p.is_image and not (p.url and p.url.lower().endswith('.mp4')) %}
+							{% if not p.embed_url and not p.is_image and not (p.url and p.url.lower().endswith('.mp4')) %}
 								
 									
{{p.domain|truncate(30, True)}} @@ -483,14 +471,8 @@ {% endif %} - {% elif p.domain in ['youtu.be','youtube.com'] %} - {% if 'lite' in p.embed_url %} - {{p.embed_url | safe}} - {% else %} -
- -
- {% endif %} + {% elif p.domain in ['youtu.be','youtube.com'] and p.embed_url and p.embed_url.startswith('
- {% elif p.embed_url and p.domain in ['youtu.be','youtube.com'] %} + {% elif p.embed_url and p.domain in ['youtu.be','youtube.com'] and p.embed_url.startswith(' - {% if 'lite' in p.embed_url %} - {{p.embed_url | safe}} - {% else %} - - {% endif %} -
- {% elif p.url and p.url.startswith('https://streamable.com/e/') %} -
- + {{p.embed_url | safe}}
{% endif %} {% endif %}