feedparser fixes for xhtml/svg/metadata
This commit is contained in:
parent
0d44180c9b
commit
dbdef26baf
21
planet/vendor/feedparser.py
vendored
21
planet/vendor/feedparser.py
vendored
@ -11,7 +11,7 @@ Recommended: Python 2.3 or later
|
||||
Recommended: CJKCodecs and iconv_codec <http://cjkpython.i18n.org/>
|
||||
"""
|
||||
|
||||
__version__ = "4.2-pre-" + "$Revision: 270 $"[11:14] + "-svn"
|
||||
__version__ = "4.2-pre-" + "$Revision: 274 $"[11:14] + "-svn"
|
||||
__license__ = """Copyright (c) 2002-2007, Mark Pilgrim, All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -568,6 +568,7 @@ class _FeedParserMixin:
|
||||
# call special handler (if defined) or default handler
|
||||
methodname = '_end_' + prefix + suffix
|
||||
try:
|
||||
if self.svgOK: raise AttributeError()
|
||||
method = getattr(self, methodname)
|
||||
method()
|
||||
except AttributeError:
|
||||
@ -2332,19 +2333,19 @@ class _HTMLSanitizer(_BaseHTMLProcessor):
|
||||
valid_css_values = re.compile('^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|' +
|
||||
'\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$')
|
||||
|
||||
mathml_elements = ['annotation', 'annotation-xml', 'maction', 'math', 'merror', 'mfrac', 'mi',
|
||||
'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom',
|
||||
'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub',
|
||||
'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',
|
||||
mathml_elements = ['annotation', 'annotation-xml', 'maction', 'math',
|
||||
'merror', 'mfrac', 'mi', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded',
|
||||
'mphantom', 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle',
|
||||
'msub', 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',
|
||||
'munderover', 'none', 'semantics']
|
||||
|
||||
mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign',
|
||||
'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth',
|
||||
'display', 'displaystyle', 'encoding', 'equalcolumns', 'equalrows', 'fence',
|
||||
'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', 'lspace',
|
||||
'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', 'maxsize',
|
||||
'minsize', 'other', 'rowalign', 'rowalign', 'rowalign', 'rowlines',
|
||||
'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection',
|
||||
'display', 'displaystyle', 'encoding', 'equalcolumns', 'equalrows',
|
||||
'fence', 'fontstyle', 'fontweight', 'frame', 'height', 'linethickness',
|
||||
'lspace', 'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant',
|
||||
'maxsize', 'minsize', 'other', 'rowalign', 'rowalign', 'rowalign',
|
||||
'rowlines', 'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection',
|
||||
'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show',
|
||||
'xlink:type', 'xmlns', 'xmlns:xlink']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user