diff --git a/pillar/markdown.py b/pillar/markdown.py index a0a39233..154e5e34 100644 --- a/pillar/markdown.py +++ b/pillar/markdown.py @@ -22,6 +22,7 @@ ALLOWED_TAGS = [ 'sup', 'sub', 'strike', 'img', 'iframe', + 'video', ] ALLOWED_ATTRIBUTES = { @@ -30,6 +31,7 @@ ALLOWED_ATTRIBUTES = { 'acronym': ['title'], 'img': ['src', 'alt', 'width', 'height', 'title'], 'iframe': ['src', 'width', 'height', 'frameborder', 'allowfullscreen'], + 'video': ['autoplay', 'controls', 'loop', 'muted', 'src'], '*': ['style'], } diff --git a/src/scripts/markdown/02_markdown-sanitizer.js b/src/scripts/markdown/02_markdown-sanitizer.js index 03aca2e6..2c19e17e 100644 --- a/src/scripts/markdown/02_markdown-sanitizer.js +++ b/src/scripts/markdown/02_markdown-sanitizer.js @@ -20,7 +20,7 @@ } // (tags that can be opened/closed) | (tags that stand alone) - var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|iframe|kbd|li|ol(?: start="\d+")?|p|pre|s|sup|sub|strong|strike|ul)>|<(br|hr)\s?\/?>)$/i; + var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|iframe|kbd|li|ol(?: start="\d+")?|p|pre|s|sup|sub|strong|strike|ul|video)>|<(br|hr)\s?\/?>)$/i; // | var a_white = /^(]+")?(\sclass="[^"<>]+")?\s?>|<\/a>)$/i;