From bb705e17a6d5bfd6d5ae5c62037a01bef89d00b1 Mon Sep 17 00:00:00 2001 From: Lucas LaBuff Date: Mon, 17 Mar 2025 17:55:04 -0400 Subject: [PATCH] revert back to Uri.EscapeDataString --- DiscordChatExporter.Core/Utils/Url.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DiscordChatExporter.Core/Utils/Url.cs b/DiscordChatExporter.Core/Utils/Url.cs index 2ccf93be..9ccbd30d 100644 --- a/DiscordChatExporter.Core/Utils/Url.cs +++ b/DiscordChatExporter.Core/Utils/Url.cs @@ -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(