Skip to content

Conformance Examples 0.1.0 — Transforms: transform-url_escape

url_escape-space-percent-encoded

Space becomes %20 (NOT plus).

Template

{{{ q | url_escape }}}

Context

{
    "q": "hello world"
}

Output

hello%20world

url_escape-reserved-preserved

Reserved characters per RFC 3986 are preserved literally.

Template

{{{ q | url_escape }}}

Context

{
    "q": "a:/?#[]@!$&'()*+,;=b"
}

Output

a:/?#[]@!$&'()*+,;=b

url_escape-non-reserved-symbol-encoded

Non-reserved, non-unreserved characters are percent-encoded.

Template

{{{ q | url_escape }}}

Context

{
    "q": "a\"b<c>d"
}

Output

a%22b%3Cc%3Ed

url_escape-utf8-multibyte

Non-ASCII characters are percent-encoded as UTF-8 (uppercase hex).

Template

{{{ q | url_escape }}}

Context

{
    "q": "café"
}

Output

caf%C3%A9

url_escape-empty

Empty input passes through.

Template

{{{ q | url_escape }}}

Context

{
    "q": ""
}

Output


Source fixture: transforms/transform-url_escape.json