# HG changeset patch # User Goffi # Date 1456846576 -3600 # Node ID 47108a4f3a70336ebd9c79f7a10ced5eef15ee47 # Parent 397ef87958b902b60f8d44069985683dce075d65 plugin text syntaxes: added 'poster' and 'controls' in allowed attributes for cleanXHTML diff -r 397ef87958b9 -r 47108a4f3a70 src/plugins/plugin_misc_text_syntaxes.py --- a/src/plugins/plugin_misc_text_syntaxes.py Tue Mar 01 01:54:21 2016 +0100 +++ b/src/plugins/plugin_misc_text_syntaxes.py Tue Mar 01 16:36:16 2016 +0100 @@ -42,7 +42,7 @@ # 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)