Skip to content
lsl.devlsl.devLSL Dev

llUnescapeURL

function
Function syntax
string llUnescapeURL(
  1. string url// Escaped URL string to decode.
);
Returns
string
Energy
10

Returns a string representing the unescaped/decoded version of url, replacing '%20' with spaces and decoding raw UTF-8 characters.

Returns a string that is an unescaped/unencoded version of url, replacing "%20" with spaces etc.

How to use
string result = llUnescapeURL("");
  • The hexadecimal encoded representation of UTF-8 byte encoding is the only supported means of access to non ASCII7 characters (Unicode characters).
  • Decoding of Unicode as "%u####" is not supported.
  • The "+" character is not decoded as a space.
Example 1
10 collapsed lines
string str = "http://wiki.secondlife.com/wiki/LSL Portal";
default
{
state_entry()
{
llOwnerSay("Plain string:\n\t" + str);
// output: "http://wiki.secondlife.com/wiki/LSL Portal"
llOwnerSay("Escaped string:\n\t" + llEscapeURL(str));
// output: "http%3A%2F%2Fwiki%2Esecondlife%2Ecom%2Fwiki%2FLSL%20Portal"
llOwnerSay("Escaped string unescaped again:\n\t" + llUnescapeURL( llEscapeURL(str) ));
// output: "http://wiki.secondlife.com/wiki/LSL Portal"
9 collapsed lines
// because escaping and unescaping are exact opposite
// and unescaping an escaped string returns the original
// For readability's sake it would make more sense to do:
llOwnerSay("For readability's sake:\n\t" + "http://wiki.secondlife.com/wiki/" + llEscapeURL("LSL Portal"));
// output: "http://wiki.secondlife.com/wiki/LSL%20Portal"
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlUnescapeURL, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.