I was trying out to see if I can extract the path name from a file URL which that has URL escaped characters e.g. file:///foo/my%2540file
When I do
new URL('file:///foo/bar%2540trajano').pathname
I get
'/foo/bar%2540trajano'
When I am expecting
'/foo/bar%40trajano'
because the URL that was passed in has escaped characters should it not decode it? This behaviour is followed by alternate pathName implementations as well.