Skip to content

Commit a13a163

Browse files
authored
update artifact info (#21902)
Signed-off-by: stonezdj <[email protected]>
1 parent b58a60e commit a13a163

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/v2.0/handler/repository.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package handler
1717
import (
1818
"context"
1919
"fmt"
20+
"html/template"
2021

2122
"github.com/go-openapi/runtime/middleware"
2223

@@ -235,7 +236,7 @@ func (r *repositoryAPI) UpdateRepository(ctx context.Context, params operation.U
235236
if err := r.repoCtl.Update(ctx, &repomodel.RepoRecord{
236237
RepositoryID: repository.RepositoryID,
237238
Name: repository.Name,
238-
Description: params.Repository.Description,
239+
Description: template.HTMLEscapeString(params.Repository.Description),
239240
}, "Description"); err != nil {
240241
return r.SendError(ctx, err)
241242
}

0 commit comments

Comments
 (0)