encode target string before calling ext.urlDecode