Compare commits

..

16 Commits

Author SHA1 Message Date
jmiller 0dee1b86e0 chore: sync updates.xml 05.22.00 from main [skip ci] 2026-06-04 12:32:00 +00:00
jmiller 428ef27f7d chore: sync updates.xml 05.21.00 from main [skip ci] 2026-06-04 12:09:37 +00:00
jmiller 85b1c4ba7c chore: sync updates.xml 05.20.00 from main [skip ci] 2026-06-04 11:56:21 +00:00
jmiller 4d732e9b9c chore: sync updates.xml 05.19.00 from main [skip ci] 2026-06-04 11:54:38 +00:00
jmiller ab24413dd8 chore: sync updates.xml 05.17.00 from main [skip ci] 2026-06-03 02:57:09 +00:00
jmiller c38d8e4146 chore: sync updates.xml 05.14.00 from main [skip ci] 2026-05-31 03:48:39 +00:00
jmiller a93a79c6a5 chore: sync updates.xml 05.13.00 from main [skip ci] 2026-05-31 03:38:28 +00:00
jmiller 9c7753d566 chore: sync updates.xml 05.12.00 from main [skip ci] 2026-05-31 03:34:56 +00:00
jmiller 55d348afba chore: sync updates.xml 05.11.00 from main [skip ci] 2026-05-31 03:19:07 +00:00
jmiller d93cc81ff9 chore: sync updates.xml 05.10.00 from main [skip ci] 2026-05-31 03:08:35 +00:00
jmiller 37d83a95f7 chore: sync updates.xml 05.09.00 from main [skip ci] 2026-05-31 02:49:27 +00:00
jmiller 97f30335db chore: sync updates.xml 05.05.00 from main [skip ci] 2026-05-30 18:02:59 +00:00
jmiller 28088362b6 chore: sync updates.xml 05.04.00 from main [skip ci] 2026-05-30 17:35:13 +00:00
jmiller a14e5c9abb chore: sync updates.xml 05.03.00 from main [skip ci] 2026-05-30 17:26:20 +00:00
jmiller 3a8bc0ee7a chore: sync updates.xml 05.02.00 from main [skip ci] 2026-05-30 16:13:28 +00:00
Jonathan Miller 0cc7297f23 fix: remove unused net/http import in require2fa.go
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 13:39:15 -05:00
2 changed files with 3 additions and 7 deletions
-2
View File
@@ -4,8 +4,6 @@
package org
import (
"net/http"
auth_model "git.mokoconsulting.tech/MokoConsulting/MokoGitea/models/auth"
"git.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/setting"
"git.mokoconsulting.tech/MokoConsulting/MokoGitea/services/context"
+3 -5
View File
@@ -150,18 +150,16 @@ func WebPathFromRequest(s string) WebPath {
}
var multiHyphenRe = regexp.MustCompile(`-{2,}`)
var nonSlugRe = regexp.MustCompile(`[^a-zA-Z0-9+.\-]`)
var nonAlphanumRe = regexp.MustCompile(`[^a-zA-Z0-9\-]`)
// sanitizeWikiTitle converts a user-provided title into a clean, URL-friendly slug.
// Spaces and special characters become hyphens, consecutive hyphens collapse to one.
// Preserves: letters, digits, hyphens, plus signs (+), and dots (.)
func sanitizeWikiTitle(title string) string {
title = strings.TrimSpace(title)
title = strings.ReplaceAll(title, " ", "-")
title = nonSlugRe.ReplaceAllString(title, "-")
title = nonAlphanumRe.ReplaceAllString(title, "-")
title = multiHyphenRe.ReplaceAllString(title, "-")
title = strings.NewReplacer("-+-", "-", "+-", "-", "-+", "-").Replace(title) // clean stray plus signs
title = strings.Trim(title, "-+.")
title = strings.Trim(title, "-")
return title
}