Lucee object methods reference

Object Method String.uRLDecode

Decodes a URL-encoded string, converting encoded characters back to their original form.
This function handles URL encoding conventions such as converting plus signs (`+`) to spaces and percent-encoded sequences (`%xx`) to their corresponding characters.
The function throws an exception when encountering malformed URL encodings (such as incomplete or invalid percent sequences like `%G`).
For optimal results, ensure the input string contains valid URL encoding.
String.uRLDecode([string charset,[boolean strict]]):string

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
charset string  No utf-8 The character encoding in which the string is encoded.
strict boolean  No   Default true, using the Apache Commons UrlDecoder which has better overall support for UTF-8 etc, but throws an exception on invalid encodings.
When false, it will attempt strict mode first, then fall back to the older custom implementation which strips out invalid encodings, if strict fails.