Use HttpUtility.UrlEncode

This commit is contained in:
Laura Hausmann 2023-03-16 00:28:55 +01:00
parent 84f81bfa66
commit b70ad17032
Signed by: zotan
GPG Key ID: D044E84C5BE01605
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}