Never sanitize when url set in front matter

Fixes #12954
This commit is contained in:
Bjørn Erik Pedersen 2024-10-16 16:59:12 +02:00
parent a2f666b586
commit e4ad0c5271
2 changed files with 12 additions and 3 deletions

View file

@ -254,7 +254,7 @@ func CreateTargetPaths(d TargetPathDescriptor) (tp TargetPaths) {
// if page URL is explicitly set in frontmatter,
// preserve its value without sanitization
if d.Kind != kinds.KindPage || d.URL == "" {
if d.URL == "" {
// Note: MakePathSanitized will lower case the path if
// disablePathToLower isn't set.
pb.Sanitize()