Skip to content

Commit

Permalink
Escape control characters when printing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtore committed Dec 23, 2023
1 parent 71105ec commit c7c1a53
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions commands/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (cmd *Print) Execute(class int, s string) error {
msg := ""
value, ok := song.StringTags[tag]
if ok {
value = strings.ReplaceAll(value, "%", "%%")
msg = fmt.Sprintf("%s: '%s'", tag, value)
} else {
msg = fmt.Sprintf("%s: <MISSING>", tag)
Expand Down

0 comments on commit c7c1a53

Please sign in to comment.