From c1975ecd61f6b64d93cb68642435386f36a19a7b Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 5 Feb 2021 09:30:13 +0100 Subject: [PATCH] escape single quote --- ffplayout/filters/v_drawtext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ffplayout/filters/v_drawtext.py b/ffplayout/filters/v_drawtext.py index 4ea0d791..9cb739b3 100644 --- a/ffplayout/filters/v_drawtext.py +++ b/ffplayout/filters/v_drawtext.py @@ -17,4 +17,5 @@ def filter(probe, node=None): font = f":fontfile='{_text.fontfile}'" if _text.text_from_filename: - return f"drawtext=text='{title}':{_text.style}{font}" + escape = title.replace("'", "'\\\\\\''") + return f"drawtext=text='{escape}':{_text.style}{font}"