hugo/common/paths
Bjørn Erik Pedersen 34033e349a
Strip hash sign (#) from file paths/URLs
The general way Hugo does this now is:

* Sanitize the file paths so the work as URLs
* When we create the final RelPermalink/Permalink, we use Go's `url.Parse` to escape it so it work for the browser.

So, leaving anything in the first step that does not work with the second step, just doesn't work.

It's a little bit odd that `url.Parse` silently truncates this URL without any error, but that's for another day.

I have another better test coverage for this.

Fixes #12342
Fixes #4926
See #8232
2024-04-05 11:37:18 +02:00
..
path.go Strip hash sign (#) from file paths/URLs 2024-04-05 11:37:18 +02:00
path_test.go Strip hash sign (#) from file paths/URLs 2024-04-05 11:37:18 +02:00
pathparser.go all: Typo fixes 2024-03-15 17:25:52 +01:00
pathparser_test.go Fix rebuild with resources.Concat 2024-02-16 13:17:53 +01:00
paths_integration_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pathtype_string.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
url.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
url_test.go tpl/urls: Retain query and fragment with absURL and absLangURL 2023-12-04 11:41:30 +01:00