unquote_to_bytes('abc%20def') -> b'abc def'.
(string)
| 669 | _hextobyte = None |
| 670 | |
| 671 | def unquote_to_bytes(string): |
| 672 | """unquote_to_bytes('abc%20def') -> b'abc def'.""" |
| 673 | return bytes(_unquote_impl(string)) |
| 674 | |
| 675 | def _unquote_impl(string: bytes | bytearray | str) -> bytes | bytearray: |
| 676 | # Note: strings are encoded as UTF-8. This is only an issue if it contains |
no test coverage detected