From 94406195826fb8e7c9f3bcc4cecea6847f00042e Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 13 Feb 2024 12:44:54 +0200 Subject: [PATCH] remove duplicate autoplay=1 and fix the amp issue --- files/helpers/bleach_body.py | 2 +- files/helpers/sanitize.py | 2 +- files/templates/formatting.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/bleach_body.py b/files/helpers/bleach_body.py index 07afded2ea..48880ebc29 100644 --- a/files/helpers/bleach_body.py +++ b/files/helpers/bleach_body.py @@ -40,7 +40,7 @@ def allowed_attributes(tag, name, value): if name == 'data-user-submitted' and not value: return True if tag == 'lite-youtube': - if name == 'params' and value.startswith('autoplay=1&modestbranding=1'): return True + if name == 'params': return True if name == 'videoid': return True if tag == 'video': diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 3c0039f76c..6fd18a34e6 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -296,7 +296,7 @@ def handle_youtube_links(url): if yt_id_regex.fullmatch(id): if not t: t = params.get('t', params.get('start', [0]))[0] - html = f'' diff --git a/files/templates/formatting.html b/files/templates/formatting.html index 925f76c8aa..317ea8338e 100644 --- a/files/templates/formatting.html +++ b/files/templates/formatting.html @@ -82,7 +82,7 @@ Youtube Videos https://youtube.com/watch?v=3Hecr51ByE4 - +