MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / quote

Function quote

lib/core/common.py:4600–4607  ·  view source on GitHub ↗
(s, safe)

Source from the content-addressed store, hash-verified

4598 # errors, say for example an umlaut in the username even though
4599 # the path *is* already quoted.
4600 def quote(s, safe):
4601 s = s or ''
4602 # Triggers on non-ascii characters - another option would be:
4603 # _urllib.parse.quote(s.replace('%', '')) != s.replace('%', '')
4604 # which would trigger on all %-characters, e.g. "&".
4605 if getUnicode(s).encode("ascii", "replace") != s or forceQuote:
4606 s = _urllib.parse.quote(getBytes(s), safe=safe)
4607 return s
4608
4609 username = quote(parts.username, '')
4610 password = quote(parts.password, safe='')

Callers 2

check_payloadFunction · 0.85
asciifyUrlFunction · 0.85

Calls 2

getUnicodeFunction · 0.90
getBytesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…