diff --git a/internal/collections/domain/collection/subject.go b/internal/collections/domain/collection/subject.go index 3534aca9..f196e687 100644 --- a/internal/collections/domain/collection/subject.go +++ b/internal/collections/domain/collection/subject.go @@ -119,7 +119,7 @@ func (s *Subject) UpdateComment(comment string) error { return gerr.ErrInvisibleChar } - s.comment = norm.NFKC.String(comment) + s.comment = norm.NFC.String(comment) return nil } diff --git a/internal/subject/mysql_repository_test.go b/internal/subject/mysql_repository_test.go index c6a767a9..93c53159 100644 --- a/internal/subject/mysql_repository_test.go +++ b/internal/subject/mysql_repository_test.go @@ -73,7 +73,7 @@ func TestBrowse(t *testing.T) { } s, err := repo.Browse(context.Background(), filter, 30, 0) require.NoError(t, err) - require.Equal(t, 12, len(s)) + require.Equal(t, 17, len(s)) filter = subject.BrowseFilter{ Type: 1, diff --git a/web/req/collection.go b/web/req/collection.go index f0e5d6aa..19503cbf 100644 --- a/web/req/collection.go +++ b/web/req/collection.go @@ -70,7 +70,7 @@ func (v *SubjectEpisodeCollectionPatch) Validate() error { } if v.Comment.Set { - v.Comment.Value = norm.NFKC.String(v.Comment.Value) + v.Comment.Value = norm.NFC.String(v.Comment.Value) v.Comment.Value = strings.TrimSpace(v.Comment.Value) if !dam.AllPrintableChar(v.Comment.Value) { return res.BadRequest("invisible character are included in comment")