url-escape the 'target' parameter

If the target parameter includes characters such as ',' or '"', the following error occurs: `URI::InvalidURIError: bad URI(is not URI?)`.  This change prevents this from occurring.