forked from tangled.org/core
Monorepo for Tangled

appview/follow: fix html IDs for did-webs

this bug prevented following did:web accounts on tangled... because of a
htmx target error.

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 0a2ae70c 06409994

verified
Changed files
+4 -2
appview
pages
state
+3 -2
appview/pages/funcmap.go
··· 297 297 }, 298 298 299 299 "normalizeForHtmlId": func(s string) string { 300 - // TODO: extend this to handle other cases? 301 - return strings.ReplaceAll(s, ":", "_") 300 + normalized := strings.ReplaceAll(s, ":", "_") 301 + normalized = strings.ReplaceAll(normalized, ".", "_") 302 + return normalized 302 303 }, 303 304 "sshFingerprint": func(pubKey string) string { 304 305 fp, err := crypto.SSHFingerprint(pubKey)
+1
appview/state/follow.go
··· 26 26 subjectIdent, err := s.idResolver.ResolveIdent(r.Context(), subject) 27 27 if err != nil { 28 28 log.Println("failed to follow, invalid did") 29 + return 29 30 } 30 31 31 32 if currentUser.Did == subjectIdent.DID.String() {