The function URL_DECODE takes a String and returns a new string by unescaping any URL Percent Encoded characters.
URL_DECODE(url) -> decoded_url
- url (type: string)
- The URL to decode.
- decoded_url (type: string)
- The decoded URL
A google search URL contains the search query in a URL parameter. For example, to search for the string "date/time", the URL is "https://www.google.com/search?q=date%2Ftime". Note that the slash is replaced by the percent-encoding "%2F". The URL_DECODE function can be used to convert such characters back into the original character that they represent.
The function URL_ENCODE performs the opposite operation. It will replace any characters that have a special meaning in a URL and replace those characters with the appropriate percent-encoding. Encoding a string, and then decoding the result will return the original string.
URL_DECODE(URL_ENCODE("date/time")) -> "date/time"
Note, however, that the URL_ENCODE function can also take numbers and booleans, in this case encoding and then decoding the value will not produce the original value, but rather a string representing the original value.
URL_DECODE(URL_ENCODE(0)) -> "0"
URL_DECODE(URL_ENCODE(true)) -> "true"