But as I said,
for (const fn of [yaml.safeDump, rison.encode]) { var u1 new URL(`/${encodeURIComponent(fn(param))}`, 'https://.') var u2 = new URL('https://.') u2.pathname = `/${encodeURIComponent(fn(param))}` console.log(u1.pathname) console.log(u2.pathname) }
None if these helps.
For conformance to RFC 3986, single and double dot segments are recognized as relative path and resolved as such. What other meaning do you want to give them? What's your worry?
NVM. As long as dot is prefixed (perhaps with ~ as it will never be URI-encoded), it seems to work.
~
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
But as I said,
None if these helps.
For conformance to RFC 3986, single and double dot segments are recognized as relative path and resolved as such. What other meaning do you want to give them? What's your worry?
NVM. As long as dot is prefixed (perhaps with
~
as it will never be URI-encoded), it seems to work.