diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs index daf4444df..7d1cb0b55 100644 --- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs +++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs @@ -50,7 +50,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin { throw new InvalidOperationException(nameof(response.Content.Link)); } - return Uri.EscapeUriString(response.Content.Link); + return Uri.EscapeDataString(response.Content.Link); } #pragma warning disable CA1812 // False positive, the class is used during json deserialization diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs index c918e8bc7..1ee981919 100644 --- a/ArchiSteamFarm/IPC/Startup.cs +++ b/ArchiSteamFarm/IPC/Startup.cs @@ -21,6 +21,7 @@ #if NETFRAMEWORK using ArchiSteamFarm.Compatibility; +using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Converters; using File = System.IO.File; using Path = System.IO.Path; @@ -43,7 +44,6 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Headers; using Microsoft.AspNetCore.HttpOverrides; -using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; @@ -323,10 +323,10 @@ namespace ArchiSteamFarm.IPC { mvc.AddControllersAsServices(); +#if NETFRAMEWORK // Use latest compatibility version for MVC mvc.SetCompatibilityVersion(CompatibilityVersion.Latest); -#if NETFRAMEWORK // Add standard formatters mvc.AddFormatterMappings();