From 86acb429bafc703684aa0bd47b6495c2044d89dd Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com> Date: Mon, 6 Jan 2020 14:04:41 +0100 Subject: Adding iframe attributes to attribute whitelist To properly show YouTube-embeds, we need to allow some attributes on `iframe` tags. I've added all attributes that are normal for such an embed, including `width` and `height` (which we may not need if we want to make the frame resize to its parent). --- pydis_site/settings.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pydis_site/settings.py') diff --git a/pydis_site/settings.py b/pydis_site/settings.py index e8b71e76..72cc0ab9 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -373,6 +373,7 @@ WIKI_MARKDOWN_HTML_ATTRIBUTES = { 'img': ['class', 'id', 'src', 'alt', 'width', 'height'], 'section': ['class', 'id'], 'article': ['class', 'id'], + 'iframe': ['width', 'height', 'src', 'frameborder', 'allow', 'allowfullscreen'], } WIKI_MARKDOWN_HTML_WHITELIST = [ -- cgit v1.2.3