diff src/plugins/plugin_misc_text_syntaxes.py @ 1867:47108a4f3a70

plugin text syntaxes: added 'poster' and 'controls' in allowed attributes for cleanXHTML
author Goffi <goffi@goffi.org>
date Tue, 01 Mar 2016 16:36:16 +0100
parents d8c6c55aafd7
children 2daf7b4c6756
line wrap: on
line diff
--- 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)