mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-27 04:05:58 +00:00
Minor update
This commit is contained in:
parent
9d18c81fe0
commit
c57f461441
3 changed files with 5 additions and 5 deletions
4
thirdparty/beautifulsoup/beautifulsoup.py
vendored
4
thirdparty/beautifulsoup/beautifulsoup.py
vendored
|
|
@ -126,7 +126,7 @@ DEFAULT_OUTPUT_ENCODING = "utf-8"
|
|||
|
||||
def _match_css_class(str):
|
||||
"""Build a RE to match the given CSS class."""
|
||||
return re.compile(r"(^|.*\s)%s($|\s)" % str)
|
||||
return re.compile(r"(^|.*\s)%s($|\s)" % re.escape(str))
|
||||
|
||||
# First, the classes that represent markup elements.
|
||||
|
||||
|
|
@ -490,7 +490,7 @@ class NavigableString(text_type, PageElement):
|
|||
def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
|
||||
# Substitute outgoing XML entities.
|
||||
data = self.BARE_AMPERSAND_OR_BRACKET.sub(self._sub_entity, self)
|
||||
if encoding:
|
||||
if encoding and sys.version_info < (3, 0):
|
||||
return data.encode(encoding)
|
||||
else:
|
||||
return data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue