this script will detect URLs in a string and automatically create a link to this URL.
it removes the query-string and shows only the top-level of the site linked to as text.

copy the code of string handling / autolink

click here to select all the code