mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
safer encode
not just hash encoding, but also other characters. Has no adverse side effects, as seen in the image in the PR.
This commit is contained in:
parent
c7ff0f3680
commit
e577bef402
1 changed files with 2 additions and 2 deletions
|
@ -69,8 +69,8 @@ public override UploadResult Upload(Stream stream, string fileName)
|
|||
|
||||
// Original, unencoded path. Necessary for shared files
|
||||
string path = URLHelpers.CombineURL(Path, fileName);
|
||||
// Encoded path (# replaced by %23), necessary when sent in the URL
|
||||
string encodedPath = URLHelpers.CombineURL(Path, fileName.Replace("#", "%23"));
|
||||
// Encoded path, necessary when sent in the URL
|
||||
string encodedPath = URLHelpers.CombineURL(Path, URLHelpers.URLEncode(fileName));
|
||||
|
||||
string url = URLHelpers.CombineURL(Host, "remote.php/webdav", encodedPath);
|
||||
url = URLHelpers.FixPrefix(url);
|
||||
|
|
Loading…
Reference in a new issue