- Contents
Interaction Designer Help
Escape URL
This Internet tool formats an argument to be appended to a URL by converting any spaces and/or special characters into their ASCII equivalents preceded by the % sign.
Example:
Consider the following URL:
http://thissite.com?arg1=test&arg2=this
Everything following the "?" is an argument that can be used by code (CGI, Java Script, servlet, VB script). In this format the "?","=" and "&" are special characters. Also, spaces are not allowed because a space signals the end of the arguments.
But, suppose arg1 was to be "this is a test? & how come?" instead of "test" as show above, resulting in the following URL:
http://thissite.com?arg1=this is a test? & how come?
This would cause a problem because the formatting of that argument is not consistent with URL formatting. Using this tool, the above argument would have all spaces and special characters converted into their ASCII codes, with the URL-formatting-compliant result being:
http://thissite.com?arg1=this%20is%20a%20test%3F%20%26%20how%20come%3f
Note: You must escape "this is a test? & how come" before you tack it on to the URL you are building. If you try to escape the entire URL it may escape characters that should not be escaped.
Input
Escape a string for a URL
This string is the argument to be converted.
Output
Return Value
This string is the converted argument to be attached to the URL.
Exit Path
Next
This tool always takes the Next exit path.