mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 07:43:31 -07:00
Use WebUtility.UrlEncode instead of Uri.EscapeDataString
This commit is contained in:
parent
db50a2bb96
commit
9e115562dc
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace DiscordChatExporter.Core.Utils;
|
||||
|
|
@ -18,12 +18,12 @@ public static class Url
|
|||
var separatorIndex = filePath.IndexOfAny([':', '/', '\\'], position);
|
||||
if (separatorIndex < 0)
|
||||
{
|
||||
buffer.Append(Uri.EscapeDataString(filePath[position..]));
|
||||
buffer.Append(WebUtility.UrlEncode(filePath[position..]));
|
||||
break;
|
||||
}
|
||||
|
||||
// Append the segment
|
||||
buffer.Append(Uri.EscapeDataString(filePath[position..separatorIndex]));
|
||||
buffer.Append(WebUtility.UrlEncode(filePath[position..separatorIndex]));
|
||||
|
||||
// Append the separator
|
||||
buffer.Append(
|
||||
|
|
|
|||
Loading…
Reference in a new issue