MCPcopy Create free account
hub / github.com/gogs/gogs / ToWikiPageName

Function ToWikiPageName

internal/database/wiki.go:40–44  ·  view source on GitHub ↗

ToWikiPageName formats a URL back to corresponding wiki page name. It enforces single-level hierarchy by replacing all "/" with spaces.

(urlString string)

Source from the content-addressed store, hash-verified

38// ToWikiPageName formats a URL back to corresponding wiki page name. It enforces
39// single-level hierarchy by replacing all "/" with spaces.
40func ToWikiPageName(urlString string) string {
41 name, _ := url.QueryUnescape(urlString)
42 name = pathutil.Clean(name)
43 return strings.ReplaceAll(name, "/", " ")
44}
45
46// WikiCloneLink returns clone URLs of repository wiki.
47//

Callers 7

renderWikiPageFunction · 0.92
NewWikiPostFunction · 0.92
EditWikiPostFunction · 0.92
DeleteWikiPagePostFunction · 0.92
updateWikiPageMethod · 0.85
DeleteWikiPageMethod · 0.85
TestToWikiPageNameFunction · 0.85

Calls 2

CleanFunction · 0.92
ReplaceAllMethod · 0.80

Tested by 1

TestToWikiPageNameFunction · 0.68