Commit 3fcd6237 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_base: support large file

Module erp5.component.module.erp5_version.ImageUtil, line 47, in transformUrlToDataURI
root = etree.fromstring(content)
Module lxml.etree, line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:79010)
Module lxml.etree, line 1848, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:118341)
Module lxml.etree, line 1736, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:117021)
Module lxml.etree, line 1102, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:111265)
Module lxml.etree, line 595, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:105109)
Module lxml.etree, line 706, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:106817)
Module lxml.etree, line 635, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:105671)
XMLSyntaxError: internal error: Huge input lookup, line 194, column 308278 (line 194)
parent 072b7287
...@@ -44,7 +44,7 @@ def transformUrlToDataURI(content): ...@@ -44,7 +44,7 @@ def transformUrlToDataURI(content):
if content is None or len(content) == 0: if content is None or len(content) == 0:
return content return content
root = etree.fromstring(content) root = etree.fromstring(content, parser=etree.XMLParser(huge_tree=True))
# Prevent namespace contains "None" included into svg by mistake # Prevent namespace contains "None" included into svg by mistake
# and fix svg definition as in some images the namespace is not # and fix svg definition as in some images the namespace is not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment