Fix relative URLs when serving the specification with a custom baseURL (#1984)

This commit is contained in:
Kévin Commaille 2024-11-14 12:11:34 +01:00 committed by GitHub
parent b1f66d1b71
commit bf8dee74eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 101 additions and 92 deletions

View file

@ -335,7 +335,7 @@ resolve-additional-types.)
{{ $stringFormat := "" }}
{{ with index site.Data "string-formats" . }}
{{ $stringFormat = printf "<a href=\"%s\">%s</a>" (htmlEscape .url) (htmlEscape .title) }}
{{ $stringFormat = printf "<a href=\"%s\">%s</a>" (htmlEscape .url | relURL) (htmlEscape .title) }}
{{ end }}
{{ return $stringFormat }}