We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Убрать атрибуты Autoplay и Loop для видео, заливаемых напрямую в клуб
### Discussed in https://github.com/vas3k/vas3k.club/discussions/1113

<div type='discussions-op-text'>

<sup>Originally posted by **resaixe** November  4, 2020</sup>
Сейчас видео, которые заливаются напрямую в клуб, имеют атрибуты `autoplay="autoplay" loop="loop"`. 
Например, в [этом комментарии](https://vas3k.club/post/5942/#comment-6e78d5e4-7e7d-496e-a75a-e6516f0255f8) сейчас так:
```html
<video src="https://i.vas3k.club/d6600209ae05582854a384bb1ce5cfe23c64697b8f111b21ceabdfd72fce72bc.mp4" controls="controls" autoplay="autoplay" loop="loop" muted="muted" playsinline=""></video>
```

Предлагаю убрать эти атрибуты, чтобы пользователи сами решали, когда и сколько раз они хотят посмотреть видео. Чтобы стало так:
```html
<video src="https://i.vas3k.club/d6600209ae05582854a384bb1ce5cfe23c64697b8f111b21ceabdfd72fce72bc.mp4" controls="controls" muted="muted" playsinline=""></video>
```</div>

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `common/markdown/email_renderer.py`
Content:
```
1 from mistune import escape_html
2 
3 from common.markdown.club_renderer import ClubRenderer
4 from common.regexp import YOUTUBE_RE
5 
6 
7 class EmailRenderer(ClubRenderer):
8     def simple_image(self, src, alt="", title=None):
9         return f"""<img src="{src}" alt="{alt}" width="600" border="0"><br>{title or ""}"""
10 
11     def youtube(self, src, alt="", title=None):
12         youtube_match = YOUTUBE_RE.match(src)
13         youtube_id = escape_html(youtube_match.group(1) or "")
14         return f'<a href="{escape_html(src)}"><span class="ratio-16-9 video-preview" ' \
15                f'style="background-image: url(\'https://img.youtube.com/vi/{escape_html(youtube_id)}/0.jpg\');">' \
16                f'</span></a><br>{escape_html(title or "")}'
17 
18     def video(self, src, alt="", title=None):
19         return f'<video src="{escape_html(src)}" controls autoplay loop muted playsinline>{alt}</video><br>{title or ""}'
20 
21     def tweet(self, src, alt="", title=None):
22         return f'<a href="{escape_html(src)}">{escape_html(src)}</a><br>{escape_html(title or "")}'
23 
24     def heading(self, text, level):
25         tag = f"h{level}"
26         return f"<{tag}>{text}</{tag}>\n"
27
```

Path: `common/markdown/club_renderer.py`
Content:
```
1 import html
2 import mistune
3 from urllib.parse import unquote
4 from mistune import escape_html
5 from slugify import slugify
6 
7 from common.regexp import IMAGE_RE, VIDEO_RE, YOUTUBE_RE, TWITTER_RE, USERNAME_RE
8 
9 IMAGE_CSS_CLASSES = {
10     "-": "text-body-image-full"
11 }
12 
13 
14 class ClubRenderer(mistune.HTMLRenderer):
15     def text(self, text):
16         text = escape_html(text)
17         text = USERNAME_RE.sub(r' <a href="/user/\1/">@\1</a>', text)
18         return text
19 
20     def paragraph(self, text):
21         text = text.replace("\n", "<br>\n")  # Mistune 2.0 broke newlines, let's hack it =/
22         return f"<p>{text}</p>\n"
23 
24     def heading(self, text, level):
25         tag = f"h{level}"
26         anchor = slugify(text[:24])
27         return f"<{tag} id=\"{anchor}\"><a href=\"#{anchor}\">{text}</a></{tag}>\n"
28 
29     def link(self, link, text=None, title=None):
30         if not text and not title:
31             # it's a pure link (without link tag) and we can try to parse it
32             embed = self.embed(link, text or "", title or "")
33             if embed:
34                 return embed
35 
36         if text is None:
37             text = link
38 
39         # here's some magic of unescape->unquote->escape
40         # to fix cyrillic (and other non-latin) wikipedia URLs
41         return f'<a href="{self._safe_url(link)}">{html.escape(unquote(html.unescape(text or link)))}</a>'
42 
43     def image(self, src, alt="", title=None):
44         embed = self.embed(src, alt, title)
45         if embed:
46             return embed
47 
48         # users can try to "hack" our parser by using non-image urls
49         # so, if its not an image or video, display it as a link to avoid auto-loading
50         return f'<a href="{escape_html(src)}">{escape_html(src)}</a>'
51 
52     def embed(self, src, alt="", title=None):
53         if IMAGE_RE.match(src):
54             return self.simple_image(src, alt, title)
55 
56         if YOUTUBE_RE.match(src):
57             return self.youtube(src, alt, title)
58 
59         if VIDEO_RE.match(src):
60             return self.video(src, alt, title)
61 
62         if TWITTER_RE.match(src):
63             return self.tweet(src, alt, title)
64 
65         return None
66 
67     def simple_image(self, src, alt="", title=None):
68         css_classes = ""
69         title = title or alt
70         if title in IMAGE_CSS_CLASSES:
71             css_classes = IMAGE_CSS_CLASSES[title]
72 
73         image_tag = f'<img src="{escape_html(src)}" alt="{escape_html(title)}">'
74         caption = f"<figcaption>{escape_html(title)}</figcaption>" if title else ""
75         return f'<figure class="{css_classes}">{image_tag}{caption}</figure>'
76 
77     def youtube(self, src, alt="", title=None):
78         youtube_match = YOUTUBE_RE.match(src)
79         playlist = ""
80         if youtube_match.group(2):
81             playlist = f"list={escape_html(youtube_match.group(2))}&listType=playlist&"
82         video_tag = (
83             f'<span class="ratio-16-9">'
84             f'<iframe loading="lazy" src="https://www.youtube.com/embed/{escape_html(youtube_match.group(1) or "")}'
85             f'?{playlist}autoplay=0&amp;controls=1&amp;showinfo=1&amp;vq=hd1080"'
86             f'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"'
87             f'allowfullscreen></iframe>'
88             f"</span>"
89         )
90         caption = f"<figcaption>{escape_html(title)}</figcaption>" if title else ""
91         return f"<figure>{video_tag}{caption}</figure>"
92 
93     def video(self, src, alt="", title=None):
94         video_tag = (
95             f'<video src="{escape_html(src)}" controls autoplay loop muted playsinline>{escape_html(alt)}</video>'
96         )
97         caption = f"<figcaption>{escape_html(title)}</figcaption>" if title else ""
98         return f"<figure>{video_tag}{caption}</figure>"
99 
100     def tweet(self, src, alt="", title=None):
101         tweet_match = TWITTER_RE.match(src)
102         twitter_tag = f'<blockquote class="twitter-tweet" tw-align-center>' \
103                       f'<a href="{tweet_match.group(1)}"></a></blockquote><br>' \
104                       f'<a href="{src}" target="_blank">{src}</a>'
105         return twitter_tag
106
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/common/markdown/club_renderer.py b/common/markdown/club_renderer.py
--- a/common/markdown/club_renderer.py
+++ b/common/markdown/club_renderer.py
@@ -92,7 +92,7 @@
 
     def video(self, src, alt="", title=None):
         video_tag = (
-            f'<video src="{escape_html(src)}" controls autoplay loop muted playsinline>{escape_html(alt)}</video>'
+            f'<video src="{escape_html(src)}" controls muted playsinline>{escape_html(alt)}</video>'
         )
         caption = f"<figcaption>{escape_html(title)}</figcaption>" if title else ""
         return f"<figure>{video_tag}{caption}</figure>"
diff --git a/common/markdown/email_renderer.py b/common/markdown/email_renderer.py
--- a/common/markdown/email_renderer.py
+++ b/common/markdown/email_renderer.py
@@ -16,7 +16,7 @@
                f'</span></a><br>{escape_html(title or "")}'
 
     def video(self, src, alt="", title=None):
-        return f'<video src="{escape_html(src)}" controls autoplay loop muted playsinline>{alt}</video><br>{title or ""}'
+        return f'<video src="{escape_html(src)}" controls muted playsinline>{alt}</video><br>{title or ""}'
 
     def tweet(self, src, alt="", title=None):
         return f'<a href="{escape_html(src)}">{escape_html(src)}</a><br>{escape_html(title or "")}'

{"golden_diff": "diff --git a/common/markdown/club_renderer.py b/common/markdown/club_renderer.py\n--- a/common/markdown/club_renderer.py\n+++ b/common/markdown/club_renderer.py\n@@ -92,7 +92,7 @@\n \n     def video(self, src, alt=\"\", title=None):\n         video_tag = (\n-            f'<video src=\"{escape_html(src)}\" controls autoplay loop muted playsinline>{escape_html(alt)}</video>'\n+            f'<video src=\"{escape_html(src)}\" controls muted playsinline>{escape_html(alt)}</video>'\n         )\n         caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n         return f\"<figure>{video_tag}{caption}</figure>\"\ndiff --git a/common/markdown/email_renderer.py b/common/markdown/email_renderer.py\n--- a/common/markdown/email_renderer.py\n+++ b/common/markdown/email_renderer.py\n@@ -16,7 +16,7 @@\n                f'</span></a><br>{escape_html(title or \"\")}'\n \n     def video(self, src, alt=\"\", title=None):\n-        return f'<video src=\"{escape_html(src)}\" controls autoplay loop muted playsinline>{alt}</video><br>{title or \"\"}'\n+        return f'<video src=\"{escape_html(src)}\" controls muted playsinline>{alt}</video><br>{title or \"\"}'\n \n     def tweet(self, src, alt=\"\", title=None):\n         return f'<a href=\"{escape_html(src)}\">{escape_html(src)}</a><br>{escape_html(title or \"\")}'\n", "issue": "\u0423\u0431\u0440\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b Autoplay \u0438 Loop \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e, \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u043a\u043b\u0443\u0431\n### Discussed in https://github.com/vas3k/vas3k.club/discussions/1113\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **resaixe** November  4, 2020</sup>\r\n\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u0438\u0434\u0435\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u043a\u043b\u0443\u0431, \u0438\u043c\u0435\u044e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b `autoplay=\"autoplay\" loop=\"loop\"`. \r\n\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 [\u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438](https://vas3k.club/post/5942/#comment-6e78d5e4-7e7d-496e-a75a-e6516f0255f8) \u0441\u0435\u0439\u0447\u0430\u0441 \u0442\u0430\u043a:\r\n```html\r\n<video src=\"https://i.vas3k.club/d6600209ae05582854a384bb1ce5cfe23c64697b8f111b21ceabdfd72fce72bc.mp4\" controls=\"controls\" autoplay=\"autoplay\" loop=\"loop\" muted=\"muted\" playsinline=\"\"></video>\r\n```\r\n\r\n\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0443\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441\u0430\u043c\u0438 \u0440\u0435\u0448\u0430\u043b\u0438, \u043a\u043e\u0433\u0434\u0430 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u043d\u0438 \u0445\u043e\u0442\u044f\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e. \u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u043b\u043e \u0442\u0430\u043a:\r\n```html\r\n<video src=\"https://i.vas3k.club/d6600209ae05582854a384bb1ce5cfe23c64697b8f111b21ceabdfd72fce72bc.mp4\" controls=\"controls\" muted=\"muted\" playsinline=\"\"></video>\r\n```</div>\n", "before_files": [{"content": "from mistune import escape_html\n\nfrom common.markdown.club_renderer import ClubRenderer\nfrom common.regexp import YOUTUBE_RE\n\n\nclass EmailRenderer(ClubRenderer):\n    def simple_image(self, src, alt=\"\", title=None):\n        return f\"\"\"<img src=\"{src}\" alt=\"{alt}\" width=\"600\" border=\"0\"><br>{title or \"\"}\"\"\"\n\n    def youtube(self, src, alt=\"\", title=None):\n        youtube_match = YOUTUBE_RE.match(src)\n        youtube_id = escape_html(youtube_match.group(1) or \"\")\n        return f'<a href=\"{escape_html(src)}\"><span class=\"ratio-16-9 video-preview\" ' \\\n               f'style=\"background-image: url(\\'https://img.youtube.com/vi/{escape_html(youtube_id)}/0.jpg\\');\">' \\\n               f'</span></a><br>{escape_html(title or \"\")}'\n\n    def video(self, src, alt=\"\", title=None):\n        return f'<video src=\"{escape_html(src)}\" controls autoplay loop muted playsinline>{alt}</video><br>{title or \"\"}'\n\n    def tweet(self, src, alt=\"\", title=None):\n        return f'<a href=\"{escape_html(src)}\">{escape_html(src)}</a><br>{escape_html(title or \"\")}'\n\n    def heading(self, text, level):\n        tag = f\"h{level}\"\n        return f\"<{tag}>{text}</{tag}>\\n\"\n", "path": "common/markdown/email_renderer.py"}, {"content": "import html\nimport mistune\nfrom urllib.parse import unquote\nfrom mistune import escape_html\nfrom slugify import slugify\n\nfrom common.regexp import IMAGE_RE, VIDEO_RE, YOUTUBE_RE, TWITTER_RE, USERNAME_RE\n\nIMAGE_CSS_CLASSES = {\n    \"-\": \"text-body-image-full\"\n}\n\n\nclass ClubRenderer(mistune.HTMLRenderer):\n    def text(self, text):\n        text = escape_html(text)\n        text = USERNAME_RE.sub(r' <a href=\"/user/\\1/\">@\\1</a>', text)\n        return text\n\n    def paragraph(self, text):\n        text = text.replace(\"\\n\", \"<br>\\n\")  # Mistune 2.0 broke newlines, let's hack it =/\n        return f\"<p>{text}</p>\\n\"\n\n    def heading(self, text, level):\n        tag = f\"h{level}\"\n        anchor = slugify(text[:24])\n        return f\"<{tag} id=\\\"{anchor}\\\"><a href=\\\"#{anchor}\\\">{text}</a></{tag}>\\n\"\n\n    def link(self, link, text=None, title=None):\n        if not text and not title:\n            # it's a pure link (without link tag) and we can try to parse it\n            embed = self.embed(link, text or \"\", title or \"\")\n            if embed:\n                return embed\n\n        if text is None:\n            text = link\n\n        # here's some magic of unescape->unquote->escape\n        # to fix cyrillic (and other non-latin) wikipedia URLs\n        return f'<a href=\"{self._safe_url(link)}\">{html.escape(unquote(html.unescape(text or link)))}</a>'\n\n    def image(self, src, alt=\"\", title=None):\n        embed = self.embed(src, alt, title)\n        if embed:\n            return embed\n\n        # users can try to \"hack\" our parser by using non-image urls\n        # so, if its not an image or video, display it as a link to avoid auto-loading\n        return f'<a href=\"{escape_html(src)}\">{escape_html(src)}</a>'\n\n    def embed(self, src, alt=\"\", title=None):\n        if IMAGE_RE.match(src):\n            return self.simple_image(src, alt, title)\n\n        if YOUTUBE_RE.match(src):\n            return self.youtube(src, alt, title)\n\n        if VIDEO_RE.match(src):\n            return self.video(src, alt, title)\n\n        if TWITTER_RE.match(src):\n            return self.tweet(src, alt, title)\n\n        return None\n\n    def simple_image(self, src, alt=\"\", title=None):\n        css_classes = \"\"\n        title = title or alt\n        if title in IMAGE_CSS_CLASSES:\n            css_classes = IMAGE_CSS_CLASSES[title]\n\n        image_tag = f'<img src=\"{escape_html(src)}\" alt=\"{escape_html(title)}\">'\n        caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n        return f'<figure class=\"{css_classes}\">{image_tag}{caption}</figure>'\n\n    def youtube(self, src, alt=\"\", title=None):\n        youtube_match = YOUTUBE_RE.match(src)\n        playlist = \"\"\n        if youtube_match.group(2):\n            playlist = f\"list={escape_html(youtube_match.group(2))}&listType=playlist&\"\n        video_tag = (\n            f'<span class=\"ratio-16-9\">'\n            f'<iframe loading=\"lazy\" src=\"https://www.youtube.com/embed/{escape_html(youtube_match.group(1) or \"\")}'\n            f'?{playlist}autoplay=0&amp;controls=1&amp;showinfo=1&amp;vq=hd1080\"'\n            f'allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen\"'\n            f'allowfullscreen></iframe>'\n            f\"</span>\"\n        )\n        caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n        return f\"<figure>{video_tag}{caption}</figure>\"\n\n    def video(self, src, alt=\"\", title=None):\n        video_tag = (\n            f'<video src=\"{escape_html(src)}\" controls autoplay loop muted playsinline>{escape_html(alt)}</video>'\n        )\n        caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n        return f\"<figure>{video_tag}{caption}</figure>\"\n\n    def tweet(self, src, alt=\"\", title=None):\n        tweet_match = TWITTER_RE.match(src)\n        twitter_tag = f'<blockquote class=\"twitter-tweet\" tw-align-center>' \\\n                      f'<a href=\"{tweet_match.group(1)}\"></a></blockquote><br>' \\\n                      f'<a href=\"{src}\" target=\"_blank\">{src}</a>'\n        return twitter_tag\n", "path": "common/markdown/club_renderer.py"}], "after_files": [{"content": "from mistune import escape_html\n\nfrom common.markdown.club_renderer import ClubRenderer\nfrom common.regexp import YOUTUBE_RE\n\n\nclass EmailRenderer(ClubRenderer):\n    def simple_image(self, src, alt=\"\", title=None):\n        return f\"\"\"<img src=\"{src}\" alt=\"{alt}\" width=\"600\" border=\"0\"><br>{title or \"\"}\"\"\"\n\n    def youtube(self, src, alt=\"\", title=None):\n        youtube_match = YOUTUBE_RE.match(src)\n        youtube_id = escape_html(youtube_match.group(1) or \"\")\n        return f'<a href=\"{escape_html(src)}\"><span class=\"ratio-16-9 video-preview\" ' \\\n               f'style=\"background-image: url(\\'https://img.youtube.com/vi/{escape_html(youtube_id)}/0.jpg\\');\">' \\\n               f'</span></a><br>{escape_html(title or \"\")}'\n\n    def video(self, src, alt=\"\", title=None):\n        return f'<video src=\"{escape_html(src)}\" controls muted playsinline>{alt}</video><br>{title or \"\"}'\n\n    def tweet(self, src, alt=\"\", title=None):\n        return f'<a href=\"{escape_html(src)}\">{escape_html(src)}</a><br>{escape_html(title or \"\")}'\n\n    def heading(self, text, level):\n        tag = f\"h{level}\"\n        return f\"<{tag}>{text}</{tag}>\\n\"\n", "path": "common/markdown/email_renderer.py"}, {"content": "import html\nimport mistune\nfrom urllib.parse import unquote\nfrom mistune import escape_html\nfrom slugify import slugify\n\nfrom common.regexp import IMAGE_RE, VIDEO_RE, YOUTUBE_RE, TWITTER_RE, USERNAME_RE\n\nIMAGE_CSS_CLASSES = {\n    \"-\": \"text-body-image-full\"\n}\n\n\nclass ClubRenderer(mistune.HTMLRenderer):\n    def text(self, text):\n        text = escape_html(text)\n        text = USERNAME_RE.sub(r' <a href=\"/user/\\1/\">@\\1</a>', text)\n        return text\n\n    def paragraph(self, text):\n        text = text.replace(\"\\n\", \"<br>\\n\")  # Mistune 2.0 broke newlines, let's hack it =/\n        return f\"<p>{text}</p>\\n\"\n\n    def heading(self, text, level):\n        tag = f\"h{level}\"\n        anchor = slugify(text[:24])\n        return f\"<{tag} id=\\\"{anchor}\\\"><a href=\\\"#{anchor}\\\">{text}</a></{tag}>\\n\"\n\n    def link(self, link, text=None, title=None):\n        if not text and not title:\n            # it's a pure link (without link tag) and we can try to parse it\n            embed = self.embed(link, text or \"\", title or \"\")\n            if embed:\n                return embed\n\n        if text is None:\n            text = link\n\n        # here's some magic of unescape->unquote->escape\n        # to fix cyrillic (and other non-latin) wikipedia URLs\n        return f'<a href=\"{self._safe_url(link)}\">{html.escape(unquote(html.unescape(text or link)))}</a>'\n\n    def image(self, src, alt=\"\", title=None):\n        embed = self.embed(src, alt, title)\n        if embed:\n            return embed\n\n        # users can try to \"hack\" our parser by using non-image urls\n        # so, if its not an image or video, display it as a link to avoid auto-loading\n        return f'<a href=\"{escape_html(src)}\">{escape_html(src)}</a>'\n\n    def embed(self, src, alt=\"\", title=None):\n        if IMAGE_RE.match(src):\n            return self.simple_image(src, alt, title)\n\n        if YOUTUBE_RE.match(src):\n            return self.youtube(src, alt, title)\n\n        if VIDEO_RE.match(src):\n            return self.video(src, alt, title)\n\n        if TWITTER_RE.match(src):\n            return self.tweet(src, alt, title)\n\n        return None\n\n    def simple_image(self, src, alt=\"\", title=None):\n        css_classes = \"\"\n        title = title or alt\n        if title in IMAGE_CSS_CLASSES:\n            css_classes = IMAGE_CSS_CLASSES[title]\n\n        image_tag = f'<img src=\"{escape_html(src)}\" alt=\"{escape_html(title)}\">'\n        caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n        return f'<figure class=\"{css_classes}\">{image_tag}{caption}</figure>'\n\n    def youtube(self, src, alt=\"\", title=None):\n        youtube_match = YOUTUBE_RE.match(src)\n        playlist = \"\"\n        if youtube_match.group(2):\n            playlist = f\"list={escape_html(youtube_match.group(2))}&listType=playlist&\"\n        video_tag = (\n            f'<span class=\"ratio-16-9\">'\n            f'<iframe loading=\"lazy\" src=\"https://www.youtube.com/embed/{escape_html(youtube_match.group(1) or \"\")}'\n            f'?{playlist}autoplay=0&amp;controls=1&amp;showinfo=1&amp;vq=hd1080\"'\n            f'allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen\"'\n            f'allowfullscreen></iframe>'\n            f\"</span>\"\n        )\n        caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n        return f\"<figure>{video_tag}{caption}</figure>\"\n\n    def video(self, src, alt=\"\", title=None):\n        video_tag = (\n            f'<video src=\"{escape_html(src)}\" controls muted playsinline>{escape_html(alt)}</video>'\n        )\n        caption = f\"<figcaption>{escape_html(title)}</figcaption>\" if title else \"\"\n        return f\"<figure>{video_tag}{caption}</figure>\"\n\n    def tweet(self, src, alt=\"\", title=None):\n        tweet_match = TWITTER_RE.match(src)\n        twitter_tag = f'<blockquote class=\"twitter-tweet\" tw-align-center>' \\\n                      f'<a href=\"{tweet_match.group(1)}\"></a></blockquote><br>' \\\n                      f'<a href=\"{src}\" target=\"_blank\">{src}</a>'\n        return twitter_tag\n", "path": "common/markdown/club_renderer.py"}]}