From ed68da732f5976f081ef6dd474bb6dff1569884c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Thu, 4 Aug 2022 19:10:17 +0200 Subject: [PATCH] Revert "URL encode links when listing directories" to fix #117 This reverts commit f9f49f407f36169f72e9e970c15d89cf35a4f426. --- engine/dirhandler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/dirhandler.go b/engine/dirhandler.go index 82e36c9e2..dca0936ad 100644 --- a/engine/dirhandler.go +++ b/engine/dirhandler.go @@ -5,7 +5,6 @@ package engine import ( "bytes" "net/http" - "net/url" "path/filepath" "strings" @@ -66,7 +65,7 @@ func (ac *Config) DirectoryListing(w http.ResponseWriter, req *http.Request, roo fullFilename += filename // Remove the root directory from the link path - URLpath = url.QueryEscape(fullFilename[len(rootdir)+1:]) + URLpath = fullFilename[len(rootdir)+1:] // Output different entries for files and directories buf.WriteString(themes.HTMLLink(filename, URLpath, ac.fs.IsDir(fullFilename)))