mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Fix issue #436
``` return Uri.EscapeUriString(httpHomeUri.Uri.ToString()); ``` This return statement was double encoding filename hence the extra encoding on the "%" sign in the URL in clipboard. filename is first encoded in this line: ``` httpHomeUri = new UriBuilder(URLHelpers.CombineURL(host, subFolderPath, filename)); ```
This commit is contained in:
parent
85f2f73584
commit
166e4bd126
1 changed files with 4 additions and 2 deletions
|
@ -29,6 +29,7 @@ You should have received a copy of the GNU General Public License
|
|||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
|
||||
namespace ShareX.UploadersLib
|
||||
{
|
||||
|
@ -168,7 +169,7 @@ public string GetUriPath(string filename, string subFolderPath = null)
|
|||
filename = Path.GetFileNameWithoutExtension(filename);
|
||||
}
|
||||
|
||||
filename = URLHelpers.URLEncode(filename);
|
||||
filename = HttpUtility.UrlEncode(filename);
|
||||
|
||||
if (subFolderPath == null)
|
||||
{
|
||||
|
@ -176,6 +177,7 @@ public string GetUriPath(string filename, string subFolderPath = null)
|
|||
}
|
||||
|
||||
UriBuilder httpHomeUri;
|
||||
|
||||
var httpHomePath = GetHttpHomePath();
|
||||
|
||||
if (string.IsNullOrEmpty(httpHomePath))
|
||||
|
@ -230,7 +232,7 @@ public string GetUriPath(string filename, string subFolderPath = null)
|
|||
}
|
||||
|
||||
httpHomeUri.Scheme = BrowserProtocol.GetDescription();
|
||||
return Uri.EscapeUriString(httpHomeUri.Uri.ToString());
|
||||
return httpHomeUri.Uri.ToString();
|
||||
}
|
||||
|
||||
public string GetFtpPath(string filemame)
|
||||
|
|
Loading…
Reference in a new issue