finicky icon indicating copy to clipboard operation
finicky copied to clipboard

# Character getting in correctly encoded in URL

Open jtrott opened this issue 4 years ago • 1 comments

When I click on a link that redirects to a link that contains a "#" character, e.g. https://t.co/z8dkkfKVBu?amp=1 -> https://independentaustralia.net/politics/politics-display/the-us-state-department-sought-to-control-australian-workers,15395#.YRSBll8l2cM.twitter Finicky replaces the # character with a %023 which causes the URL to return a 404 on the website: https://independentaustralia.net/politics/politics-display/the-us-state-department-sought-to-control-australian-workers,15395%23.YRSBll8l2cM.twitter

I have a rewrite clause in my config, but it shouldn't be applying in this case, and hopefully wouldn't be encoding characters in URLs either:

rewrite: [
	{
		match: ({ url }) => url.host.endsWith("twitter.com"),
		url: ({ url, urlString }) => {
			return {
				...url,
				host: "",
				protocol: "tweetbot",
				pathname: url.pathname.replace(/^\/+/g, '')
			}
		}
	}
],

If I change my browser to be Firefox instead of Finicky, I do not have the issue.

jtrott avatar Aug 12 '21 06:08 jtrott

This is a duplicate of #184 which has a workaround in it (though the workaround is only valid if you expect it to always be a non-encoded #).

glasser avatar Feb 28 '23 18:02 glasser