diff --git a/lib/ansible/module_utils/splitter.py b/lib/ansible/module_utils/splitter.py index 849c0714c70..3daf3012e1a 100644 --- a/lib/ansible/module_utils/splitter.py +++ b/lib/ansible/module_utils/splitter.py @@ -26,9 +26,9 @@ def _get_quote_state(token, quote_char): for idx, cur_char in enumerate(token): if idx > 0: prev_char = token[idx-1] - if cur_char in '"\'': + if cur_char in '"\'' and prev_char != '\\': if quote_char: - if cur_char == quote_char and prev_char != '\\': + if cur_char == quote_char: quote_char = None else: quote_char = cur_char