MCPcopy Index your code
hub / github.com/python/cpython / _unquote

Function _unquote

Lib/http/cookies.py:204–222  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

202 return m[2]
203
204def _unquote(str):
205 # If there aren't any doublequotes,
206 # then there can't be any special characters. See RFC 2109.
207 if str is None or len(str) < 2:
208 return str
209 if str[0] != '"' or str[-1] != '"':
210 return str
211
212 # We have to assume that we must decode this string.
213 # Down to work.
214
215 # Remove the "s
216 str = str[1:-1]
217
218 # Check for special sequences. Examples:
219 # \012 --> \n
220 # \" --> "
221 #
222 return _unquote_sub(_unquote_replace, str)
223
224# The _getdate() routine is used to set the expiration time in the cookie's HTTP
225# header. By default, _getdate() returns the current time in the appropriate

Callers 2

__parse_stringMethod · 0.70
value_decodeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…