mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-06-18 14:35:37 -04:00
Revert to Uri.EscapeDataString
when encoding asset URIs (#1355)
This commit is contained in:
parent
62babc0de5
commit
6f877cf543
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user