Difference between revisions of "LlEscapeURL"

From Second Life Wiki
Jump to navigation Jump to search
Line 2: Line 2:
|func_id=307|func_sleep=0.0|func_energy=10.0
|func_id=307|func_sleep=0.0|func_energy=10.0
|func=llEscapeURL|return_type=string|p1_type=string|p1_name=url
|func=llEscapeURL|return_type=string|p1_type=string|p1_name=url
|func_footnote
|func_footnote=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.
|func_desc
|func_desc
|return_text=that is the escaped/encoded version of '''url''', replacing spaces with %20 etc. The function will escape any character not in [a-zA-Z0-9] to %xx where xx is the hexadecimal value of the byte. To clarify, numbers and ASCII letters are NOT escaped.
|return_text=that is the escaped/encoded version of '''url''', replacing spaces with %20 etc. The function will escape any character not in [a-zA-Z0-9] to %xx where xx is the hexadecimal value of the character in UTF-8 byte form.
|spec
|spec
|caveats=* 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 will be escaped.  Instead, build the URL in parts, escaping parts of the path and query string arguments as needed.  
|caveats=* 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 will be escaped.  Instead, build the URL in parts, escaping parts of the path and query string arguments as needed.  
*Between SL versions 1.9.0(21) and 1.19.1.81992, there was a bug (since apparently remedied) which permitted this function to return a max of 254 characters.
|constants
|constants
|examples
|examples
Line 21: Line 17:
|notes
|notes
|permission
|permission
|negative_index
|history=
*Between SL versions 1.9.0(21) and 1.19.1.81992, there was a bug (since apparently remedied) which permitted this function to return a max of 254 characters.
|cat1=Encoding
|cat1=Encoding
|cat2=String
|cat2=String

Revision as of 04:36, 8 July 2008

Summary

Function: string llEscapeURL( string url );
0.0 Forced Delay
10.0 Energy

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-zA-Z0-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.

Caveats

  • 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 will be escaped. Instead, build the URL in parts, escaping parts of the path and query string arguments as needed.

Examples

See Also

Functions

• llUnescapeURL

Articles

• UTF-8
• Base64

Deep Notes

History

  • Between SL versions 1.9.0(21) and 1.19.1.81992, there was a bug (since apparently remedied) which permitted this function to return a max of 254 characters.

Signature

function string llEscapeURL( string url );