From fc6e1880183d5b2efcf4d9392b83a08f3ef908f0 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 12 Apr 2018 13:01:29 +0200 Subject: [PATCH] Allow using double quotes within triple double quotes. --- bot/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/__init__.py b/bot/__init__.py index 071ec6c983..76cab5a746 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -149,6 +149,9 @@ def _get_word(self) -> str: log.trace(f"{arg} is not a str, casting to str.") arg = str(arg) + # Allow using double quotes within triple double quotes + arg = arg.replace('"', '\\"') + # Adding double quotes to every argument log.trace(f"Wrapping all args in double quotes.") new_args.append(f'"{arg}"')