diff --git a/appview/pages/funcmap.go b/appview/pages/funcmap.go index 0ccb070f..26b94b87 100644 --- a/appview/pages/funcmap.go +++ b/appview/pages/funcmap.go @@ -297,8 +297,9 @@ func (p *Pages) funcMap() template.FuncMap { }, "normalizeForHtmlId": func(s string) string { - // TODO: extend this to handle other cases? - return strings.ReplaceAll(s, ":", "_") + normalized := strings.ReplaceAll(s, ":", "_") + normalized = strings.ReplaceAll(normalized, ".", "_") + return normalized }, "sshFingerprint": func(pubKey string) string { fp, err := crypto.SSHFingerprint(pubKey) diff --git a/appview/state/follow.go b/appview/state/follow.go index bd4b847f..9e218cac 100644 --- a/appview/state/follow.go +++ b/appview/state/follow.go @@ -26,6 +26,7 @@ func (s *State) Follow(w http.ResponseWriter, r *http.Request) { subjectIdent, err := s.idResolver.ResolveIdent(r.Context(), subject) if err != nil { log.Println("failed to follow, invalid did") + return } if currentUser.Did == subjectIdent.DID.String() {