Skip to content

Commit

Permalink
Revert "URL encode links when listing directories" to fix #117
Browse files Browse the repository at this point in the history
This reverts commit f9f49f4.
  • Loading branch information
xyproto committed Aug 4, 2022
1 parent 42c93d6 commit ed68da7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions engine/dirhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package engine
import (
"bytes"
"net/http"
"net/url"
"path/filepath"
"strings"

Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit ed68da7

Please sign in to comment.