From 51a2c85954e77068c6afbb4ca54159086220aefd Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 17 Apr 2021 17:40:11 +0200 Subject: make sure every text input is safe and validated fix #630 --- commands/title_edit.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands/title_edit.go') 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 } -- cgit