mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix rendering of wiki page list if wiki repo contains other files (#3454)
* Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
This commit is contained in:
@@ -45,7 +45,7 @@ func WikiNameToFilename(name string) string {
|
||||
// WikiFilenameToName converts a wiki filename to its corresponding page name.
|
||||
func WikiFilenameToName(filename string) (string, error) {
|
||||
if !strings.HasSuffix(filename, ".md") {
|
||||
return "", fmt.Errorf("Invalid wiki filename: %s", filename)
|
||||
return "", ErrWikiInvalidFileName{filename}
|
||||
}
|
||||
basename := filename[:len(filename)-3]
|
||||
unescaped, err := url.QueryUnescape(basename)
|
||||
|
Reference in New Issue
Block a user