From 655aaaa426b35cfaf0362336cf94ddf06a77fc7f Mon Sep 17 00:00:00 2001 From: Volcyy Date: Thu, 12 Apr 2018 13:22:09 +0200 Subject: Allow using double quotes within triple double quotes. (#47) --- bot/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/__init__.py b/bot/__init__.py index 071ec6c98..76cab5a74 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}"') -- cgit v1.2.3