Minor bug fix

This commit is contained in:
Miroslav Stampar 2016-01-08 10:52:02 +01:00
parent 6f3511dcc3
commit b427f6c03e

View File

@ -197,6 +197,11 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
_ = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)
retVal = extractRegexResult(_, retVal, re.DOTALL | re.IGNORECASE) or retVal
try:
retVal = re.sub(r"&#x([^;]+);", lambda match: chr(int(match.group(1), 16)), retVal)
except ValueError:
pass
return safecharencode(retVal) if kb.safeCharEncode else retVal
def _errorFields(expression, expressionFields, expressionFieldsList, num=None, emptyFields=None, suppressOutput=False):