Minor bug fix

This commit is contained in:
Bernardo Damele 2010-10-31 12:20:38 +00:00
parent 264247d318
commit 2a2f949275

View File

@ -624,13 +624,15 @@ class Agent:
if inpStr: if inpStr:
if urlencode_: if urlencode_:
regObj = getCompiledRegex("%s(?P<result>.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER)) regObj = getCompiledRegex("(?P<result>%s.*?%s)" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER))
for match in regObj.finditer(inpStr): for match in regObj.finditer(inpStr):
retVal = retVal.replace(match.group("result"), urlencode(match.group("result"), convall=True)) retVal = retVal.replace(match.group("result"), urlencode(match.group("result").strip(PAYLOAD_DELIMITER), convall=True))
else: else:
retVal = retVal.replace(PAYLOAD_DELIMITER, '') retVal = retVal.replace(PAYLOAD_DELIMITER, '')
print retVal
return retVal return retVal
def extractPayload(self, inpStr): def extractPayload(self, inpStr):