[shared] Improved XhtmlCleaner.
This commit is contained in:
parent
d16b03e0d6
commit
9368138efd
|
@ -898,15 +898,15 @@ class XhtmlCleaner(XmlParser):
|
||||||
|
|
||||||
# Tags that will not be in the result, content included, if keepStyles is
|
# Tags that will not be in the result, content included, if keepStyles is
|
||||||
# False.
|
# False.
|
||||||
tagsToIgnoreWithContent = ('style', 'colgroup')
|
tagsToIgnoreWithContent = ('style', 'colgroup', 'head')
|
||||||
# Tags that will be removed from the result, but whose content will be kept,
|
# Tags that will be removed from the result, but whose content will be kept,
|
||||||
# if keepStyles is False.
|
# if keepStyles is False.
|
||||||
tagsToIgnoreKeepContent= ('x', 'font', 'center')
|
tagsToIgnoreKeepContent= ('x', 'font', 'center', 'html', 'body')
|
||||||
# All tags to ignore
|
# All tags to ignore
|
||||||
tagsToIgnore = tagsToIgnoreWithContent + tagsToIgnoreKeepContent
|
tagsToIgnore = tagsToIgnoreWithContent + tagsToIgnoreKeepContent
|
||||||
# Attributes to ignore, if keepStyles if False.
|
# Attributes to ignore, if keepStyles if False.
|
||||||
attrsToIgnore = ('align', 'valign', 'cellpadding', 'cellspacing', 'width',
|
attrsToIgnore = ('align', 'valign', 'cellpadding', 'cellspacing', 'width',
|
||||||
'height', 'bgcolor', 'lang', 'border', 'class')
|
'height', 'bgcolor', 'lang', 'border', 'class', 'rules')
|
||||||
# CSS attributes to keep, if keepStyles if False. These attributes can be
|
# CSS attributes to keep, if keepStyles if False. These attributes can be
|
||||||
# used by appy.pod (to align a paragraph, center/resize an image...).
|
# used by appy.pod (to align a paragraph, center/resize an image...).
|
||||||
cssAttrsToKeep = ('width', 'height', 'float', 'text-align',
|
cssAttrsToKeep = ('width', 'height', 'float', 'text-align',
|
||||||
|
|
Loading…
Reference in a new issue