revert back to Uri.EscapeDataString

This commit is contained in:
Lucas LaBuff 2025-03-17 17:55:04 -04:00
parent 62babc0de5
commit bb705e17a6

View file

@ -1,4 +1,4 @@
using System.Net;
using System;
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(WebUtility.UrlEncode(filePath[position..]));
buffer.Append(Uri.EscapeDataString(filePath[position..]));
break;
}
// Append the segment
buffer.Append(WebUtility.UrlEncode(filePath[position..separatorIndex]));
buffer.Append(Uri.EscapeDataString(filePath[position..separatorIndex]));
// Append the separator
buffer.Append(