The URI module is used to escape and unescape strings to/from a URI acceptable format (replacing spaces with '%20' for example).

 

Escape

escaped = uri:escape("This is a test"); // Returns 'This%20is%20a%20test'

 

Unescape

 unescaped = uri:unescape("This%20is%20a%20test"); // Returns 'This is a test'