aboutsummaryrefslogtreecommitdiffstats
path: root/commands/title_edit.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-04-17 17:40:11 +0200
committerMichael Muré <batolettre@gmail.com>2021-04-17 17:40:11 +0200
commit51a2c85954e77068c6afbb4ca54159086220aefd (patch)
tree9b424181369a67f69502a27186bd266a19a28506 /commands/title_edit.go
parent62fb09a53cc626ac581f33b466a1cdf14eb6ed89 (diff)
downloadgit-bug-51a2c85954e77068c6afbb4ca54159086220aefd.tar.gz
make sure every text input is safe and validated
fix #630
Diffstat (limited to 'commands/title_edit.go')
-rw-r--r--commands/title_edit.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/title_edit.go b/commands/title_edit.go
index 3750f2cc..455c9384 100644
--- a/commands/title_edit.go
+++ b/commands/title_edit.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 titleEditOptions struct {
@@ -58,7 +59,7 @@ func runTitleEdit(env *Env, opts titleEditOptions, args []string) error {
env.err.Println("No change, aborting.")
}
- _, err = b.SetTitle(opts.title)
+ _, err = b.SetTitle(text.CleanupOneLine(opts.title))
if err != nil {
return err
}