From Second Life Wiki
Revision as of 19:25, 7 December 2013 by DonFabuuk Resident (Talk | contribs)

Jump to: navigation, search


Function: string llEscapeURL( string url );

Returns a string that is the escaped/encoded version of url, replacing spaces with %20 etc. The function will escape any character not in {a-z, A-Z, 0-9} to %xx where "xx" is the hexadecimal value of the character in UTF-8 byte form.

• string url

To clarify, numbers and ASCII7 alphabetical characters are NOT escaped. If a character requires more then one byte in UTF-8 byte form then it returns multiple %xx sequences chained together.

This function is similar to functions (e.g. rawurlencode) found in many other languages: 


  • The function is not appropriate for escaping a URL all at once because the ':' after the protocol and all of the '/' characters delimiting the various parts to be escaped. Instead, build the URL in parts; escaping parts of the path and query string arguments as needed.
All Issues ~ Search JIRA for related Bugs


<lsl> // Provides a clickable link to the LSL Portal by escaping the space in the title // "LSL Portal" here becomes "LSL%20Portal"

string title = "LSL Portal";

default {

       llOwnerSay("http://wiki.secondlife.com/wiki/" + llEscapeURL(title));



See Also


• llUnescapeURL


• UTF-8
• Base64

Deep Notes


  • Prior to SL versions, this function was limited to returning a maximum of 254 characters. SVC-470

Search JIRA for related Issues


function string llEscapeURL( string url );