We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The slash after the single character directory is escaped.
const {encodePath} = require('webdav/dist/request') // Expected: /AB/C/DE // Actual : /AB/C%2FDE console.log(encodePath('/AB/C/DE'))
I think there is an error in the regular expression in encodePath function.
encodePath
function encodePath(path) { var replaced = path + .replace(/(^|[^\\])\\\\($|[^\\])/g, "$1" + SEP_PATH_WINDOWS + "$2") + .replace(/(^|[^\/])\/($|[^\/])/g, "$1" + SEP_PATH_POSIX + "$2"); var formatted = encodeURIComponent(replaced); return formatted.split(SEP_PATH_WINDOWS).join("\\\\").split(SEP_PATH_POSIX).join("/"); }
The text was updated successfully, but these errors were encountered:
Thanks for reporting @manabedaiki! I'll look into this as soon as I can..
Sorry, something went wrong.
Honour root path separators in encoding - fixes #81
05d10ef
@manabedaiki this should be solved now: https://github.com/perry-mitchell/webdav-client/pull/87/files#diff-b3bdccd01810f825eb023abab8cc2b5eR20
perry-mitchell
No branches or pull requests
The slash after the single character directory is escaped.
I think there is an error in the regular expression in
encodePath
function.The text was updated successfully, but these errors were encountered: