From b28dcdbfb33915c5a02281091d0c8f7876ffadab Mon Sep 17 00:00:00 2001 From: Goffi Date: Tue, 1 Mar 2016 16:36:16 +0100 Subject: [PATCH] plugin text syntaxes: added 'poster' and 'controls' in allowed attributes for cleanXHTML --- src/plugins/plugin_misc_text_syntaxes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plugin_misc_text_syntaxes.py b/src/plugins/plugin_misc_text_syntaxes.py index 24b01806..20a3656c 100755 --- a/src/plugins/plugin_misc_text_syntaxes.py +++ b/src/plugins/plugin_misc_text_syntaxes.py @@ -42,7 +42,7 @@ _SYNTAX_CURRENT = "@CURRENT@" # list initialy based on feedparser list (http://pythonhosted.org/feedparser/html-sanitization.html) STYLES_WHITELIST = ("azimuth", "background-color", "border-bottom-color", "border-collapse", "border-color", "border-left-color", "border-right-color", "border-top-color", "clear", "color", "cursor", "direction", "display", "elevation", "float", "font", "font-family", "font-size", "font-style", "font-variant", "font-weight", "height", "letter-spacing", "line-height", "overflow", "pause", "pause-after", "pause-before", "pitch", "pitch-range", "richness", "speak", "speak-header", "speak-numeral", "speak-punctuation", "speech-rate", "stress", "text-align", "text-decoration", "text-indent", "unicode-bidi", "vertical-align", "voice-family", "volume", "white-space", "width") -SAFE_ATTRS = html.defs.safe_attrs.union(('style',)) +SAFE_ATTRS = html.defs.safe_attrs.union(('style', 'poster', 'controls')) STYLES_VALUES_REGEX = r'^(' + '|'.join(['([a-z-]+)', # alphabetical names '(#[0-9a-f]+)', # hex value '(\d+(.\d+)? *(|%|em|ex|px|in|cm|mm|pt|pc))', # values with units (or not)