Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/imh-pyth.../lib/python2....
File: urlparse.py
"""Parse (absolute and relative) URLs.
[0] Fix | Delete
[1] Fix | Delete
urlparse module is based upon the following RFC specifications.
[2] Fix | Delete
[3] Fix | Delete
RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
[4] Fix | Delete
and L. Masinter, January 2005.
[5] Fix | Delete
[6] Fix | Delete
RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter
[7] Fix | Delete
and L.Masinter, December 1999.
[8] Fix | Delete
[9] Fix | Delete
RFC 2396: "Uniform Resource Identifiers (URI)": Generic Syntax by T.
[10] Fix | Delete
Berners-Lee, R. Fielding, and L. Masinter, August 1998.
[11] Fix | Delete
[12] Fix | Delete
RFC 2368: "The mailto URL scheme", by P.Hoffman , L Masinter, J. Zwinski, July 1998.
[13] Fix | Delete
[14] Fix | Delete
RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June
[15] Fix | Delete
1995.
[16] Fix | Delete
[17] Fix | Delete
RFC 1738: "Uniform Resource Locators (URL)" by T. Berners-Lee, L. Masinter, M.
[18] Fix | Delete
McCahill, December 1994
[19] Fix | Delete
[20] Fix | Delete
RFC 3986 is considered the current standard and any future changes to
[21] Fix | Delete
urlparse module should conform with it. The urlparse module is
[22] Fix | Delete
currently not entirely compliant with this RFC due to defacto
[23] Fix | Delete
scenarios for parsing, and for backward compatibility purposes, some
[24] Fix | Delete
parsing quirks from older RFCs are retained. The testcases in
[25] Fix | Delete
test_urlparse.py provides a good indicator of parsing behavior.
[26] Fix | Delete
[27] Fix | Delete
"""
[28] Fix | Delete
[29] Fix | Delete
import re
[30] Fix | Delete
[31] Fix | Delete
__all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag",
[32] Fix | Delete
"urlsplit", "urlunsplit", "parse_qs", "parse_qsl"]
[33] Fix | Delete
[34] Fix | Delete
# A classification of schemes ('' means apply by default)
[35] Fix | Delete
uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
[36] Fix | Delete
'wais', 'file', 'https', 'shttp', 'mms',
[37] Fix | Delete
'prospero', 'rtsp', 'rtspu', '', 'sftp',
[38] Fix | Delete
'svn', 'svn+ssh']
[39] Fix | Delete
uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
[40] Fix | Delete
'imap', 'wais', 'file', 'mms', 'https', 'shttp',
[41] Fix | Delete
'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',
[42] Fix | Delete
'svn', 'svn+ssh', 'sftp','nfs','git', 'git+ssh']
[43] Fix | Delete
uses_params = ['ftp', 'hdl', 'prospero', 'http', 'imap',
[44] Fix | Delete
'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips',
[45] Fix | Delete
'mms', '', 'sftp', 'tel']
[46] Fix | Delete
[47] Fix | Delete
# These are not actually used anymore, but should stay for backwards
[48] Fix | Delete
# compatibility. (They are undocumented, but have a public-looking name.)
[49] Fix | Delete
non_hierarchical = ['gopher', 'hdl', 'mailto', 'news',
[50] Fix | Delete
'telnet', 'wais', 'imap', 'snews', 'sip', 'sips']
[51] Fix | Delete
uses_query = ['http', 'wais', 'imap', 'https', 'shttp', 'mms',
[52] Fix | Delete
'gopher', 'rtsp', 'rtspu', 'sip', 'sips', '']
[53] Fix | Delete
uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news',
[54] Fix | Delete
'nntp', 'wais', 'https', 'shttp', 'snews',
[55] Fix | Delete
'file', 'prospero', '']
[56] Fix | Delete
[57] Fix | Delete
# Characters valid in scheme names
[58] Fix | Delete
scheme_chars = ('abcdefghijklmnopqrstuvwxyz'
[59] Fix | Delete
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
[60] Fix | Delete
'0123456789'
[61] Fix | Delete
'+-.')
[62] Fix | Delete
[63] Fix | Delete
MAX_CACHE_SIZE = 20
[64] Fix | Delete
_parse_cache = {}
[65] Fix | Delete
[66] Fix | Delete
def clear_cache():
[67] Fix | Delete
"""Clear the parse cache."""
[68] Fix | Delete
_parse_cache.clear()
[69] Fix | Delete
[70] Fix | Delete
[71] Fix | Delete
class ResultMixin(object):
[72] Fix | Delete
"""Shared methods for the parsed result objects."""
[73] Fix | Delete
[74] Fix | Delete
@property
[75] Fix | Delete
def username(self):
[76] Fix | Delete
netloc = self.netloc
[77] Fix | Delete
if "@" in netloc:
[78] Fix | Delete
userinfo = netloc.rsplit("@", 1)[0]
[79] Fix | Delete
if ":" in userinfo:
[80] Fix | Delete
userinfo = userinfo.split(":", 1)[0]
[81] Fix | Delete
return userinfo
[82] Fix | Delete
return None
[83] Fix | Delete
[84] Fix | Delete
@property
[85] Fix | Delete
def password(self):
[86] Fix | Delete
netloc = self.netloc
[87] Fix | Delete
if "@" in netloc:
[88] Fix | Delete
userinfo = netloc.rsplit("@", 1)[0]
[89] Fix | Delete
if ":" in userinfo:
[90] Fix | Delete
return userinfo.split(":", 1)[1]
[91] Fix | Delete
return None
[92] Fix | Delete
[93] Fix | Delete
@property
[94] Fix | Delete
def hostname(self):
[95] Fix | Delete
netloc = self.netloc.split('@')[-1]
[96] Fix | Delete
if '[' in netloc and ']' in netloc:
[97] Fix | Delete
return netloc.split(']')[0][1:].lower()
[98] Fix | Delete
elif ':' in netloc:
[99] Fix | Delete
return netloc.split(':')[0].lower()
[100] Fix | Delete
elif netloc == '':
[101] Fix | Delete
return None
[102] Fix | Delete
else:
[103] Fix | Delete
return netloc.lower()
[104] Fix | Delete
[105] Fix | Delete
@property
[106] Fix | Delete
def port(self):
[107] Fix | Delete
netloc = self.netloc.split('@')[-1].split(']')[-1]
[108] Fix | Delete
if ':' in netloc:
[109] Fix | Delete
port = netloc.split(':')[1]
[110] Fix | Delete
if port:
[111] Fix | Delete
port = int(port, 10)
[112] Fix | Delete
# verify legal port
[113] Fix | Delete
if (0 <= port <= 65535):
[114] Fix | Delete
return port
[115] Fix | Delete
return None
[116] Fix | Delete
[117] Fix | Delete
from collections import namedtuple
[118] Fix | Delete
[119] Fix | Delete
class SplitResult(namedtuple('SplitResult', 'scheme netloc path query fragment'), ResultMixin):
[120] Fix | Delete
[121] Fix | Delete
__slots__ = ()
[122] Fix | Delete
[123] Fix | Delete
def geturl(self):
[124] Fix | Delete
return urlunsplit(self)
[125] Fix | Delete
[126] Fix | Delete
[127] Fix | Delete
class ParseResult(namedtuple('ParseResult', 'scheme netloc path params query fragment'), ResultMixin):
[128] Fix | Delete
[129] Fix | Delete
__slots__ = ()
[130] Fix | Delete
[131] Fix | Delete
def geturl(self):
[132] Fix | Delete
return urlunparse(self)
[133] Fix | Delete
[134] Fix | Delete
[135] Fix | Delete
def urlparse(url, scheme='', allow_fragments=True):
[136] Fix | Delete
"""Parse a URL into 6 components:
[137] Fix | Delete
<scheme>://<netloc>/<path>;<params>?<query>#<fragment>
[138] Fix | Delete
Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
[139] Fix | Delete
Note that we don't break the components up in smaller bits
[140] Fix | Delete
(e.g. netloc is a single string) and we don't expand % escapes."""
[141] Fix | Delete
tuple = urlsplit(url, scheme, allow_fragments)
[142] Fix | Delete
scheme, netloc, url, query, fragment = tuple
[143] Fix | Delete
if scheme in uses_params and ';' in url:
[144] Fix | Delete
url, params = _splitparams(url)
[145] Fix | Delete
else:
[146] Fix | Delete
params = ''
[147] Fix | Delete
return ParseResult(scheme, netloc, url, params, query, fragment)
[148] Fix | Delete
[149] Fix | Delete
def _splitparams(url):
[150] Fix | Delete
if '/' in url:
[151] Fix | Delete
i = url.find(';', url.rfind('/'))
[152] Fix | Delete
if i < 0:
[153] Fix | Delete
return url, ''
[154] Fix | Delete
else:
[155] Fix | Delete
i = url.find(';')
[156] Fix | Delete
return url[:i], url[i+1:]
[157] Fix | Delete
[158] Fix | Delete
def _splitnetloc(url, start=0):
[159] Fix | Delete
delim = len(url) # position of end of domain part of url, default is end
[160] Fix | Delete
for c in '/?#': # look for delimiters; the order is NOT important
[161] Fix | Delete
wdelim = url.find(c, start) # find first of this delim
[162] Fix | Delete
if wdelim >= 0: # if found
[163] Fix | Delete
delim = min(delim, wdelim) # use earliest delim position
[164] Fix | Delete
return url[start:delim], url[delim:] # return (domain, rest)
[165] Fix | Delete
[166] Fix | Delete
def urlsplit(url, scheme='', allow_fragments=True):
[167] Fix | Delete
"""Parse a URL into 5 components:
[168] Fix | Delete
<scheme>://<netloc>/<path>?<query>#<fragment>
[169] Fix | Delete
Return a 5-tuple: (scheme, netloc, path, query, fragment).
[170] Fix | Delete
Note that we don't break the components up in smaller bits
[171] Fix | Delete
(e.g. netloc is a single string) and we don't expand % escapes."""
[172] Fix | Delete
allow_fragments = bool(allow_fragments)
[173] Fix | Delete
key = url, scheme, allow_fragments, type(url), type(scheme)
[174] Fix | Delete
cached = _parse_cache.get(key, None)
[175] Fix | Delete
if cached:
[176] Fix | Delete
return cached
[177] Fix | Delete
if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth
[178] Fix | Delete
clear_cache()
[179] Fix | Delete
netloc = query = fragment = ''
[180] Fix | Delete
i = url.find(':')
[181] Fix | Delete
if i > 0:
[182] Fix | Delete
if url[:i] == 'http': # optimize the common case
[183] Fix | Delete
scheme = url[:i].lower()
[184] Fix | Delete
url = url[i+1:]
[185] Fix | Delete
if url[:2] == '//':
[186] Fix | Delete
netloc, url = _splitnetloc(url, 2)
[187] Fix | Delete
if (('[' in netloc and ']' not in netloc) or
[188] Fix | Delete
(']' in netloc and '[' not in netloc)):
[189] Fix | Delete
raise ValueError("Invalid IPv6 URL")
[190] Fix | Delete
if allow_fragments and '#' in url:
[191] Fix | Delete
url, fragment = url.split('#', 1)
[192] Fix | Delete
if '?' in url:
[193] Fix | Delete
url, query = url.split('?', 1)
[194] Fix | Delete
v = SplitResult(scheme, netloc, url, query, fragment)
[195] Fix | Delete
_parse_cache[key] = v
[196] Fix | Delete
return v
[197] Fix | Delete
for c in url[:i]:
[198] Fix | Delete
if c not in scheme_chars:
[199] Fix | Delete
break
[200] Fix | Delete
else:
[201] Fix | Delete
# make sure "url" is not actually a port number (in which case
[202] Fix | Delete
# "scheme" is really part of the path)
[203] Fix | Delete
rest = url[i+1:]
[204] Fix | Delete
if not rest or any(c not in '0123456789' for c in rest):
[205] Fix | Delete
# not a port number
[206] Fix | Delete
scheme, url = url[:i].lower(), rest
[207] Fix | Delete
[208] Fix | Delete
if url[:2] == '//':
[209] Fix | Delete
netloc, url = _splitnetloc(url, 2)
[210] Fix | Delete
if (('[' in netloc and ']' not in netloc) or
[211] Fix | Delete
(']' in netloc and '[' not in netloc)):
[212] Fix | Delete
raise ValueError("Invalid IPv6 URL")
[213] Fix | Delete
if allow_fragments and '#' in url:
[214] Fix | Delete
url, fragment = url.split('#', 1)
[215] Fix | Delete
if '?' in url:
[216] Fix | Delete
url, query = url.split('?', 1)
[217] Fix | Delete
v = SplitResult(scheme, netloc, url, query, fragment)
[218] Fix | Delete
_parse_cache[key] = v
[219] Fix | Delete
return v
[220] Fix | Delete
[221] Fix | Delete
def urlunparse(data):
[222] Fix | Delete
"""Put a parsed URL back together again. This may result in a
[223] Fix | Delete
slightly different, but equivalent URL, if the URL that was parsed
[224] Fix | Delete
originally had redundant delimiters, e.g. a ? with an empty query
[225] Fix | Delete
(the draft states that these are equivalent)."""
[226] Fix | Delete
scheme, netloc, url, params, query, fragment = data
[227] Fix | Delete
if params:
[228] Fix | Delete
url = "%s;%s" % (url, params)
[229] Fix | Delete
return urlunsplit((scheme, netloc, url, query, fragment))
[230] Fix | Delete
[231] Fix | Delete
def urlunsplit(data):
[232] Fix | Delete
"""Combine the elements of a tuple as returned by urlsplit() into a
[233] Fix | Delete
complete URL as a string. The data argument can be any five-item iterable.
[234] Fix | Delete
This may result in a slightly different, but equivalent URL, if the URL that
[235] Fix | Delete
was parsed originally had unnecessary delimiters (for example, a ? with an
[236] Fix | Delete
empty query; the RFC states that these are equivalent)."""
[237] Fix | Delete
scheme, netloc, url, query, fragment = data
[238] Fix | Delete
if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'):
[239] Fix | Delete
if url and url[:1] != '/': url = '/' + url
[240] Fix | Delete
url = '//' + (netloc or '') + url
[241] Fix | Delete
if scheme:
[242] Fix | Delete
url = scheme + ':' + url
[243] Fix | Delete
if query:
[244] Fix | Delete
url = url + '?' + query
[245] Fix | Delete
if fragment:
[246] Fix | Delete
url = url + '#' + fragment
[247] Fix | Delete
return url
[248] Fix | Delete
[249] Fix | Delete
def urljoin(base, url, allow_fragments=True):
[250] Fix | Delete
"""Join a base URL and a possibly relative URL to form an absolute
[251] Fix | Delete
interpretation of the latter."""
[252] Fix | Delete
if not base:
[253] Fix | Delete
return url
[254] Fix | Delete
if not url:
[255] Fix | Delete
return base
[256] Fix | Delete
bscheme, bnetloc, bpath, bparams, bquery, bfragment = \
[257] Fix | Delete
urlparse(base, '', allow_fragments)
[258] Fix | Delete
scheme, netloc, path, params, query, fragment = \
[259] Fix | Delete
urlparse(url, bscheme, allow_fragments)
[260] Fix | Delete
if scheme != bscheme or scheme not in uses_relative:
[261] Fix | Delete
return url
[262] Fix | Delete
if scheme in uses_netloc:
[263] Fix | Delete
if netloc:
[264] Fix | Delete
return urlunparse((scheme, netloc, path,
[265] Fix | Delete
params, query, fragment))
[266] Fix | Delete
netloc = bnetloc
[267] Fix | Delete
if path[:1] == '/':
[268] Fix | Delete
return urlunparse((scheme, netloc, path,
[269] Fix | Delete
params, query, fragment))
[270] Fix | Delete
if not path and not params:
[271] Fix | Delete
path = bpath
[272] Fix | Delete
params = bparams
[273] Fix | Delete
if not query:
[274] Fix | Delete
query = bquery
[275] Fix | Delete
return urlunparse((scheme, netloc, path,
[276] Fix | Delete
params, query, fragment))
[277] Fix | Delete
segments = bpath.split('/')[:-1] + path.split('/')
[278] Fix | Delete
# XXX The stuff below is bogus in various ways...
[279] Fix | Delete
if segments[-1] == '.':
[280] Fix | Delete
segments[-1] = ''
[281] Fix | Delete
while '.' in segments:
[282] Fix | Delete
segments.remove('.')
[283] Fix | Delete
while 1:
[284] Fix | Delete
i = 1
[285] Fix | Delete
n = len(segments) - 1
[286] Fix | Delete
while i < n:
[287] Fix | Delete
if (segments[i] == '..'
[288] Fix | Delete
and segments[i-1] not in ('', '..')):
[289] Fix | Delete
del segments[i-1:i+1]
[290] Fix | Delete
break
[291] Fix | Delete
i = i+1
[292] Fix | Delete
else:
[293] Fix | Delete
break
[294] Fix | Delete
if segments == ['', '..']:
[295] Fix | Delete
segments[-1] = ''
[296] Fix | Delete
elif len(segments) >= 2 and segments[-1] == '..':
[297] Fix | Delete
segments[-2:] = ['']
[298] Fix | Delete
return urlunparse((scheme, netloc, '/'.join(segments),
[299] Fix | Delete
params, query, fragment))
[300] Fix | Delete
[301] Fix | Delete
def urldefrag(url):
[302] Fix | Delete
"""Removes any existing fragment from URL.
[303] Fix | Delete
[304] Fix | Delete
Returns a tuple of the defragmented URL and the fragment. If
[305] Fix | Delete
the URL contained no fragments, the second element is the
[306] Fix | Delete
empty string.
[307] Fix | Delete
"""
[308] Fix | Delete
if '#' in url:
[309] Fix | Delete
s, n, p, a, q, frag = urlparse(url)
[310] Fix | Delete
defrag = urlunparse((s, n, p, a, q, ''))
[311] Fix | Delete
return defrag, frag
[312] Fix | Delete
else:
[313] Fix | Delete
return url, ''
[314] Fix | Delete
[315] Fix | Delete
try:
[316] Fix | Delete
unicode
[317] Fix | Delete
except NameError:
[318] Fix | Delete
def _is_unicode(x):
[319] Fix | Delete
return 0
[320] Fix | Delete
else:
[321] Fix | Delete
def _is_unicode(x):
[322] Fix | Delete
return isinstance(x, unicode)
[323] Fix | Delete
[324] Fix | Delete
# unquote method for parse_qs and parse_qsl
[325] Fix | Delete
# Cannot use directly from urllib as it would create a circular reference
[326] Fix | Delete
# because urllib uses urlparse methods (urljoin). If you update this function,
[327] Fix | Delete
# update it also in urllib. This code duplication does not existin in Python3.
[328] Fix | Delete
[329] Fix | Delete
_hexdig = '0123456789ABCDEFabcdef'
[330] Fix | Delete
_hextochr = dict((a+b, chr(int(a+b,16)))
[331] Fix | Delete
for a in _hexdig for b in _hexdig)
[332] Fix | Delete
_asciire = re.compile('([\x00-\x7f]+)')
[333] Fix | Delete
[334] Fix | Delete
def unquote(s):
[335] Fix | Delete
"""unquote('abc%20def') -> 'abc def'."""
[336] Fix | Delete
if _is_unicode(s):
[337] Fix | Delete
if '%' not in s:
[338] Fix | Delete
return s
[339] Fix | Delete
bits = _asciire.split(s)
[340] Fix | Delete
res = [bits[0]]
[341] Fix | Delete
append = res.append
[342] Fix | Delete
for i in range(1, len(bits), 2):
[343] Fix | Delete
append(unquote(str(bits[i])).decode('latin1'))
[344] Fix | Delete
append(bits[i + 1])
[345] Fix | Delete
return ''.join(res)
[346] Fix | Delete
[347] Fix | Delete
bits = s.split('%')
[348] Fix | Delete
# fastpath
[349] Fix | Delete
if len(bits) == 1:
[350] Fix | Delete
return s
[351] Fix | Delete
res = [bits[0]]
[352] Fix | Delete
append = res.append
[353] Fix | Delete
for item in bits[1:]:
[354] Fix | Delete
try:
[355] Fix | Delete
append(_hextochr[item[:2]])
[356] Fix | Delete
append(item[2:])
[357] Fix | Delete
except KeyError:
[358] Fix | Delete
append('%')
[359] Fix | Delete
append(item)
[360] Fix | Delete
return ''.join(res)
[361] Fix | Delete
[362] Fix | Delete
def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
[363] Fix | Delete
"""Parse a query given as a string argument.
[364] Fix | Delete
[365] Fix | Delete
Arguments:
[366] Fix | Delete
[367] Fix | Delete
qs: percent-encoded query string to be parsed
[368] Fix | Delete
[369] Fix | Delete
keep_blank_values: flag indicating whether blank values in
[370] Fix | Delete
percent-encoded queries should be treated as blank strings.
[371] Fix | Delete
A true value indicates that blanks should be retained as
[372] Fix | Delete
blank strings. The default false value indicates that
[373] Fix | Delete
blank values are to be ignored and treated as if they were
[374] Fix | Delete
not included.
[375] Fix | Delete
[376] Fix | Delete
strict_parsing: flag indicating what to do with parsing errors.
[377] Fix | Delete
If false (the default), errors are silently ignored.
[378] Fix | Delete
If true, errors raise a ValueError exception.
[379] Fix | Delete
"""
[380] Fix | Delete
dict = {}
[381] Fix | Delete
for name, value in parse_qsl(qs, keep_blank_values, strict_parsing):
[382] Fix | Delete
if name in dict:
[383] Fix | Delete
dict[name].append(value)
[384] Fix | Delete
else:
[385] Fix | Delete
dict[name] = [value]
[386] Fix | Delete
return dict
[387] Fix | Delete
[388] Fix | Delete
def parse_qsl(qs, keep_blank_values=0, strict_parsing=0):
[389] Fix | Delete
"""Parse a query given as a string argument.
[390] Fix | Delete
[391] Fix | Delete
Arguments:
[392] Fix | Delete
[393] Fix | Delete
qs: percent-encoded query string to be parsed
[394] Fix | Delete
[395] Fix | Delete
keep_blank_values: flag indicating whether blank values in
[396] Fix | Delete
percent-encoded queries should be treated as blank strings. A
[397] Fix | Delete
true value indicates that blanks should be retained as blank
[398] Fix | Delete
strings. The default false value indicates that blank values
[399] Fix | Delete
are to be ignored and treated as if they were not included.
[400] Fix | Delete
[401] Fix | Delete
strict_parsing: flag indicating what to do with parsing errors. If
[402] Fix | Delete
false (the default), errors are silently ignored. If true,
[403] Fix | Delete
errors raise a ValueError exception.
[404] Fix | Delete
[405] Fix | Delete
Returns a list, as G-d intended.
[406] Fix | Delete
"""
[407] Fix | Delete
pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')]
[408] Fix | Delete
r = []
[409] Fix | Delete
for name_value in pairs:
[410] Fix | Delete
if not name_value and not strict_parsing:
[411] Fix | Delete
continue
[412] Fix | Delete
nv = name_value.split('=', 1)
[413] Fix | Delete
if len(nv) != 2:
[414] Fix | Delete
if strict_parsing:
[415] Fix | Delete
raise ValueError, "bad query field: %r" % (name_value,)
[416] Fix | Delete
# Handle case of a control-name with no equal sign
[417] Fix | Delete
if keep_blank_values:
[418] Fix | Delete
nv.append('')
[419] Fix | Delete
else:
[420] Fix | Delete
continue
[421] Fix | Delete
if len(nv[1]) or keep_blank_values:
[422] Fix | Delete
name = unquote(nv[0].replace('+', ' '))
[423] Fix | Delete
value = unquote(nv[1].replace('+', ' '))
[424] Fix | Delete
r.append((name, value))
[425] Fix | Delete
[426] Fix | Delete
return r
[427] Fix | Delete
[428] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function