Maps a string to be used in a query or post into a form that is
acceptable in an URL. Typically used when the caller wants to
safely generate an HREF containing an arbitrary string that may
have special characters.
URL strings may not contain non-alphanumeric characters. All
non-alphanumeric characters are converted to the escape sequence
"%XX", where XX is the hexadecimal value of that character's code.
Note that the space character " " is NOT converted to "+". That is
a common misconception. "+" represents a space only in query strings,
not in the URL. "%20" is how an actual space character must be
passed in an URL, and is also an acceptable way of passing a space in
a query string.
Parameters: string - The string to convert. The URL-encoded version of the given string. |