Skip to content
TipPage Docs
Esc
navigateopen⌘Jpreview
On this page

{queryescape:…} / {pathescape:…}

Make text safe to put in a URL - as a query value, or as part of the path.

{queryescape:text}     for after ?key=   (spaces become +)
{pathescape:text}      for inside the path   (spaces become %20)

Platforms: Twitch and Kick.

Both replace characters that would break a URL (&, /, ?, #, spaces, emoji, …). Use queryescape for a value after ?something= and pathescape for a piece of the path itself.

Examples

!google   →  https://www.google.com/search?q={queryescape:{args}}
!define   →  {urlfetch:https://api.example.com/define?word={queryescape:{arg:1}}}
!profile  →  https://example.com/users/{pathescape:{touser}}

This is how viewer text gets into a {urlfetch:} safely: the address stays yours, the encoded text rides in the query.

Was this page helpful?