MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / unquote_plus

Function unquote_plus

tools/python-3.11.9-amd64/Lib/urllib/parse.py:802–809  ·  view source on GitHub ↗

Like unquote(), but also replace plus signs by spaces, as required for unquoting HTML form values. unquote_plus('%7e/abc+def') -> '~/abc def'

(string, encoding='utf-8', errors='replace')

Source from the content-addressed store, hash-verified

800 return r
801
802def unquote_plus(string, encoding='utf-8', errors='replace'):
803 """Like unquote(), but also replace plus signs by spaces, as required for
804 unquoting HTML form values.
805
806 unquote_plus('%7e/abc+def') -> '~/abc def'
807 """
808 string = string.replace('+', ' ')
809 return unquote(string, encoding, errors)
810
811_ALWAYS_SAFE = frozenset(b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
812 b'abcdefghijklmnopqrstuvwxyz'

Callers 1

_unquoteFunction · 0.85

Calls 2

unquoteFunction · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected