MCPcopy
hub / github.com/caronc/apprise / unquote

Method unquote

apprise/url.py:580–604  ·  view source on GitHub ↗

Replace %xx escapes by their single-character equivalent. The optional encoding and errors parameters specify how to decode percent- encoded sequences. Wrapper to Python's `unquote` while remaining compatible with both Python 2 & 3 since the reference to this functio

(content, encoding="utf-8", errors="replace")

Source from the content-addressed store, hash-verified

578
579 @staticmethod
580 def unquote(content, encoding="utf-8", errors="replace"):
581 """Replace %xx escapes by their single-character equivalent. The
582 optional encoding and errors parameters specify how to decode percent-
583 encoded sequences.
584
585 Wrapper to Python's `unquote` while remaining compatible with both
586 Python 2 & 3 since the reference to this function changed between
587 versions.
588
589 Note: errors set to 'replace' means that invalid sequences are
590 replaced by a placeholder character.
591
592 Args:
593 content (str): The quoted URI string you wish to unquote
594 encoding (:obj:`str`, optional): encoding type
595 errors (:obj:`str`, errors): how to handle invalid character found
596 in encoded string (defined by encoding)
597
598 Returns:
599 str: The unquoted URI string
600 """
601 if not content:
602 return ""
603
604 return _unquote(content, encoding=encoding, errors=errors)
605
606 @staticmethod
607 def quote(content, safe="/", encoding=None, errors=None):

Callers 15

test_notify_baseFunction · 0.80
__init__Method · 0.80
split_pathMethod · 0.80
parse_listMethod · 0.80
parse_phone_noMethod · 0.80
parse_urlMethod · 0.80
parse_native_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_notify_baseFunction · 0.64