diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 10e8592c8b..0f8c832c41 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 ddd1e9f95e..fba36ea406 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 %}