Closed Eagle3386 closed 6 years ago
Oh. file:/// URLs shouldn't be going into that encoder at all (ref. the comment). That's a bug — got an example?
Sure, there you go:
Desired:
file://///some-server/path/to.an/important folder/in some/deep/sub_directory/structure/
Received:
file://///some-server/path/to.an/important%20folder/in%20some/deep/sub_directory/structure/
Ah, the ol' five-slash file: URL rears it's ugly head again ...
Thanks so much again, Neil!
So long as it actually works! 😃
Will test after vacation/upon add-on update.. 😉
@fnxweb Unfortunately, it doesn't work. In fact, URL Link seems to make it even worse now:
\\some-server\path\to.an\important folder\in some\deep\sub_directory\structure\
gets turned into
http://www.%5c%5csome-server%5cpath%5cto.an%5cimportant%20folder%5cin%20some%5cdeep%5csub_directory%5cstructure/
Notice that not only spaces remain encoded, but slashes get encoded, too (though, the trailing slash isn't) and the wrong prefix is added (http://www.
).
Sorry, not ignoring you, my mail for this address was broken and I didn't notice!
OK, that's interesting, that URL worked fine for me when I tested it. I'll have another look.
OK, I'll be uploading 3.3.2 shortly, and that'll hopefully fix it. AMO doesn't support betas any more, and it's PITA to self-sign add-ons, so we may have to go round the houses here a couple of times (unless you have the dev. version installed which accepts unsigned add-ons)!
A wholly different bug to the one I fixed earlier; TBH, looking at the code, I can't figure out how it ever worked!
Regarding your comments:
:rofl: @ your last sentence. I don't know either.. :wink:
Cool, if it's still bollox I'll attach an XPI to this. Or you can always fetch it and add as a temporary plugin.
Sorry for being late, I've not recovered from conjunctivitis and a deep-seated cold. Used the short brake from sleep and all, to improve a couple of minor bugs (see my PRs) and opened #11.
Regarding this one, I think I'll try the latter - less work and faster results for you. :smiley:
Additionally, running version 3.3.2, the abovementioned
\\some-server\path\to.an\important folder\in some\deep\sub_directory\structure\
now gets turned into
file://///some-server/path/to.an/important folder/in some/deep/sub_directory/structure/
hence neither wrong prefix nor falsely encoded slashes.
So, I'd call this finally fixed. Once again, thanks for your awesome work, Neil! :+1:
Cool. I'll look at the other stuff over the weekend at some point.
As shown in background.js, line 474,
file:///
links get encoded under certain circumstances but keeps several characters from being encoded.Recently, I had a Windows 7 machine which failed to access a Windows server 2012 UNC share, because whitespaces are encoded to
%20
. Without, i. e. replacing it with the original whitespaces again, it worked.Hence, I'd like to ask for whitespaces being added to line 427.