From b70ad17032be6e1fee23cb84d9d71bdf3f8b4eaa Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 16 Mar 2023 00:28:55 +0100 Subject: [PATCH] Use HttpUtility.UrlEncode --- Pages/Index.cshtml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pages/Index.cshtml.cs b/Pages/Index.cshtml.cs index 026d694..14b6378 100644 --- a/Pages/Index.cshtml.cs +++ b/Pages/Index.cshtml.cs @@ -50,8 +50,8 @@ namespace webmusic.Pages { if (Log.StatisticsEnabled && Request.Headers["Remote-User"].Equals(Log.StatisticsUser) && Files.Any()) { var pathparts = Displaypath.Split(System.IO.Path.DirectorySeparatorChar); if (pathparts.Length > 2) { - LogAlbum = Encode(pathparts[Index.FromEnd(1)]); - LogArtist = Encode(pathparts[Index.FromEnd(2)]); + LogAlbum = HttpUtility.UrlEncode(pathparts[Index.FromEnd(1)]); + LogArtist = HttpUtility.UrlEncode(pathparts[Index.FromEnd(2)]); LogUrl = Request.GetEncodedUrl(); LogConditionsMet = true; }