mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
minor update
This commit is contained in:
parent
ef27fd5ea1
commit
0e815177c8
|
@ -1111,11 +1111,11 @@ def sanitizeAsciiString(subject):
|
|||
else:
|
||||
return None
|
||||
|
||||
def getFilteredPageContent(page):
|
||||
def getFilteredPageContent(page, onlyText=True):
|
||||
retVal = page
|
||||
|
||||
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:
|
||||
retVal = retVal.replace(" ", " ")
|
||||
|
|
Loading…
Reference in New Issue
Block a user