0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-14 22:55:32 +01:00

Add .org condition to escapeSegToWeb

This commit is contained in:
Aly Sewelam 2025-11-24 11:53:55 +02:00
parent 3931b8fc83
commit 36c23b8b8a

View File

@ -76,7 +76,7 @@ func unescapeSegment(s string) (string, error) {
}
func escapeSegToWeb(s string, hadDashMarker bool) string {
if hadDashMarker || strings.Contains(s, "-") || strings.HasSuffix(s, ".md") {
if hadDashMarker || strings.Contains(s, "-") || strings.HasSuffix(s, ".md") || strings.HasSuffix(s, ".org") {
s = addDashMarker(s)
} else {
s = strings.ReplaceAll(s, " ", "-")