mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
minor update
This commit is contained in:
parent
ef27fd5ea1
commit
0e815177c8
|
@ -1111,11 +1111,11 @@ def sanitizeAsciiString(subject):
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def getFilteredPageContent(page):
|
def getFilteredPageContent(page, onlyText=True):
|
||||||
retVal = page
|
retVal = page
|
||||||
|
|
||||||
if isinstance(page, basestring):
|
if isinstance(page, basestring):
|
||||||
retVal = re.sub(r"(?s)<script.+?</script>|<style.+?</style>|<[^>]+>|\t|\n|\r", " ", page)
|
retVal = re.sub(r"(?s)<script.+?</script>|<style.+?</style>%s" % (r"|<[^>]+>|\t|\n|\r" if onlyText else ""), " ", page)
|
||||||
|
|
||||||
while retVal.find(" ") != -1:
|
while retVal.find(" ") != -1:
|
||||||
retVal = retVal.replace(" ", " ")
|
retVal = retVal.replace(" ", " ")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user