urldecode

STRINGurldecodeSTRINGinput

Available inall subroutines.

Decodes a percent-encoded string. For example, urldecode({"hello%20world+!"}); and urldecode("hello%2520world+!"); will both return "hello world !".

This function is not prefixed with the std. namespace.

Example

set req.http.X-Cookie = regsub(req.url, ".*\?cookie=", "");
set req.http.Cookie = urldecode(req.http.X-Cookie);