escape single quote

This commit is contained in:
jb-alvarado 2021-02-05 09:30:13 +01:00
parent 26a227b5dd
commit c1975ecd61

View File

@ -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}"