This commit is contained in:
Miroslav Stampar
2016-07-20 16:49:27 +02:00
parent 1ca633ae64
commit ebb73b71fa
3 changed files with 7 additions and 4 deletions

View File

@@ -51,6 +51,7 @@ from lib.core.settings import MAX_BUFFERED_PARTIAL_UNION_LENGTH
from lib.core.settings import NULL
from lib.core.settings import SQL_SCALAR_REGEX
from lib.core.settings import TURN_OFF_RESUME_INFO_LIMIT
from lib.core.settings import UNICODE_ENCODING
from lib.core.threads import getCurrentThreadData
from lib.core.threads import runThreads
from lib.core.unescaper import unescaper
@@ -105,7 +106,7 @@ def _oneShotUnionUse(expression, unpack=True, limited=False):
output = extractRegexResult(r"(?P<result>(<row.+?/>)+)", page)
if output:
try:
root = xml.etree.ElementTree.fromstring("<root>%s</root>" % output)
root = xml.etree.ElementTree.fromstring("<root>%s</root>" % output.encode(UNICODE_ENCODING))
retVal = ""
for column in kb.dumpColumns:
base64 = True
@@ -128,6 +129,8 @@ def _oneShotUnionUse(expression, unpack=True, limited=False):
except xml.etree.ElementTree.ParseError:
pass
else:
retVal = getUnicode(retVal)
if retVal is not None:
retVal = getUnicode(retVal, kb.pageEncoding)