Skip to content

unquote

Written as unquote(argnum flags):options in a transform expression.

Minimum arguments 1
Maximum arguments 1
Default arguments 1
Argument modes SINGLE_PRIMITIVE

Decode URL-encoded text (percent-encoding).

Features:

  • Decodes percent-encoded strings according to RFC 3986
  • Handles both UTF-8 encoded and ASCII characters
  • Preserves plus signs (+)
  • Works with both strings and bytes objects

Behavior:

  • Decodes %xx sequences to their corresponding characters
  • Converts ‘+’ to space character unless alternative encoding specified
  • Returns the same type as input (str or bytes)
  • Preserves non-encoded characters as-is
Flag Letter
noncaptive_input I
Input args: ["Hello%20World%21"]
Transforms: "unquote:"
Output: "Hello World!"
Input args: ["first+last%40domain.com"]
Transforms: "unquote:"
Input args: ["Hello%20World"]
Transforms: "unquote:"
Output: "Hello World"
Input args: ["%E4%BD%A0%E5%A5%BD"]
Transforms: "unquote:"
Output: "你好"
Input args: ["2%2B2%3D4"]
Transforms: "unquote:"
Output: "2+2=4"