diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 3e239c88d..88c4c0faf 100755 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -201,22 +201,22 @@ def sanitize(sanitized, noimages=False): for i in re.finditer('" target="_blank">(https://youtube.com/watch\?v\=.*?)', sanitized): url = i.group(1) replacing = f'{url}' - htmlsource = f'' + htmlsource = f'' sanitized = sanitized.replace(replacing, htmlsource.replace("watch?v=", "embed/")) for i in re.finditer('{url}' - htmlsource = f'' + htmlsource = f'' sanitized = sanitized.replace(replacing, htmlsource) for i in re.finditer('

(https:.*?\.mp4)

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

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

') for i in re.finditer('{url}' - htmlsource = f'' + htmlsource = f'' sanitized = sanitized.replace(replacing, htmlsource) for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]: diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 84f08a470..892ac7bd9 100755 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -532,16 +532,16 @@ {% if p.url and p.url.lower().endswith('.mp4') %}

{% elif p.embed_url and "youtu" in p.domain %}
- +
{% elif p.url and "streamable.com/e/" in p.url %}
- +
{% endif %} {% endif %}