Roger F. Gay
Roger F. Gay
resource-mapper, line 87 pathname.split(pathUtil.sep).map((component) => encodeURIComponent(component)).join('/') Does anyone know why the component should be URI encoded? This is where forward slashes are replaced by %2F.
Shouldn't it be encodeURI() instead of encodeURIComponent()? That would preserve the forward slashes. I'm using ASCII so did a simple test by not encoding. The problem described here goes away...
Using encodeURI(), I just added https://шеллы.example.net as a trusted app without problem. It appears in card$.ttl exactly as https://шеллы.example.net Nothing else is malformed as in the first post. Still has...
Alternatively, trying to see this as a Windows only problem ... just replace pathUtil.sep with '/' :) pathname.split('/').map((component) => encodeURIComponent(component)).join('/') But I still don't know why there's any need to...
Yes. Explicit use of '/' works for Windows too whereas pathUtil.sep (\ on Windows) doesn't. I'm still wondering about the first solution though. I don't see why encodeURIComponent() is appropriate....
What would be wrong with doing it like this? (os independet) pathname.split('/').map((component) => encodeURI(component)).join('/')
How is this lesser? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI
Yes. I can get it to work with only changes is resource mapper. I'm still a newbie but trying to extend my concern to the overall project, I think the...
The data browser seems to work pretty well now on Windows. I've submitted PR #1535
My curiosity about this line of code hasn't died. I've even been looking at various uri schemes. It would be more efficient to use: encodeURI(pathname).join('/') rather than pathname.split(pathUtil.sep).map((component) => encodeURIComponent(component)).join('/')...