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