From 2e1001f802786cdca7f6dbcbe43435b2bbcec210 Mon Sep 17 00:00:00 2001 From: Joe Williams <7463219+BubbaJoe@users.noreply.github.com> Date: Fri, 21 Oct 2022 23:54:12 +0900 Subject: [PATCH] only escape when the text is not empty --- filters.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filters.go b/filters.go index 725fec7..13744f8 100644 --- a/filters.go +++ b/filters.go @@ -85,7 +85,7 @@ func (s *Stream) DrawBox(x, y, w, h int, color string, thickness int, kwargs ... func (s *Stream) Drawtext(text string, x, y int, escape bool, kwargs ...KwArgs) *Stream { AssertType(s.Type, "FilterableStream", "drawtext") args := MergeKwArgs(kwargs) - if escape { + if escape && text != "" { text = fmt.Sprintf("%q", text) } if text != "" {