diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-17 19:40:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-17 19:40:01 +0200 |
commit | 6d1c9346cc5ff892f808a7e3dd3e01291e49a16d (patch) | |
tree | 9b424181369a67f69502a27186bd266a19a28506 /commands/comment_add.go | |
parent | 62fb09a53cc626ac581f33b466a1cdf14eb6ed89 (diff) | |
parent | 51a2c85954e77068c6afbb4ca54159086220aefd (diff) | |
download | git-bug-6d1c9346cc5ff892f808a7e3dd3e01291e49a16d.tar.gz |
Merge pull request #632 from MichaelMure/data-input-cleanup
make sure every text input is safe and validated
Diffstat (limited to 'commands/comment_add.go')
-rw-r--r-- | commands/comment_add.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/comment_add.go b/commands/comment_add.go index 6caf4943..438e983a 100644 --- a/commands/comment_add.go +++ b/commands/comment_add.go @@ -5,6 +5,7 @@ import ( _select "github.com/MichaelMure/git-bug/commands/select" "github.com/MichaelMure/git-bug/input" + "github.com/MichaelMure/git-bug/util/text" ) type commentAddOptions struct { @@ -62,7 +63,7 @@ func runCommentAdd(env *Env, opts commentAddOptions, args []string) error { } } - _, err = b.AddComment(opts.message) + _, err = b.AddComment(text.Cleanup(opts.message)) if err != nil { return err } |