{"action":"closed","issue":{"url":"https://api.github.com/repos/behave/behave/issues/350","labels_url":"https://api.github.com/repos/behave/behave/issues/350/labels{/name}","comments_url":"https://api.github.com/repos/behave/behave/issues/350/comments","events_url":"https://api.github.com/repos/behave/behave/issues/350/events","html_url":"https://github.com/behave/behave/issues/350","id":97553500,"number":350,"title":"Improper handling of escape characters in double-quoted named fields","user":{"login":"mcandre","id":5316,"avatar_url":"https://avatars.githubusercontent.com/u/5316?v=3","gravatar_id":"","url":"https://api.github.com/users/mcandre","html_url":"https://github.com/mcandre","followers_url":"https://api.github.com/users/mcandre/followers","following_url":"https://api.github.com/users/mcandre/following{/other_user}","gists_url":"https://api.github.com/users/mcandre/gists{/gist_id}","starred_url":"https://api.github.com/users/mcandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcandre/subscriptions","organizations_url":"https://api.github.com/users/mcandre/orgs","repos_url":"https://api.github.com/users/mcandre/repos","events_url":"https://api.github.com/users/mcandre/events{/privacy}","received_events_url":"https://api.github.com/users/mcandre/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/behave/behave/labels/info","name":"info","color":"444444"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-27T20:59:56Z","updated_at":"2016-01-15T21:56:34Z","closed_at":"2016-01-15T21:56:34Z","body":"Behave is incorrectly interpreting my escape characters as a series of literals, in my double-quoted command field.\r\n\r\nFeature:\r\n\r\n    When I run the command \"python/bin/network/kafka_request_executor.py -t requests_twitter -g integration-test -c \\\"{\\\"iter_timeout\\\": 5}\\\" -l INFO\"\r\n\r\nStep:\r\n\r\n```\r\n@when('I run the command \"{command}\"')\r\ndef i_run_the_command(context, command):\r\n    print('Command: ' + pformat(command))\r\n```\r\n\r\nExpected:\r\n\r\n    Command: python/bin/network/kafka_request_executor.py -t requests_twitter -g integration-test -c \"{\"iter_timeout\": 5}\" -l INFO\r\n\r\nObserved:\r\n\r\n    Command: python/bin/network/kafka_request_executor.py -t requests_twitter -g integration-test -c \\\\\"{\\\\\"iter_timeout\\\\\": 5}\\\\\" -l INFO\r\n\r\nMitigation:\r\n\r\nIf I use single quotes instead of double quotes in the template string and feature definition, the escaped characters are parsed correctly.\r\n\r\nE.g.:\r\n\r\nFeature:\r\n\r\n    When I run the command 'python/bin/network/kafka_request_executor.py -t requests_twitter -g integration-test -c \"{\\\"iter_timeout\\\": 5}\" -l INFO'\r\n\r\nStep:\r\n\r\n```\r\n@when('I run the command \\'{command}\\'')\r\ndef i_run_the_command(context, command):\r\n    print('Command: ' + pformat(command))\r\n```\r\n\r\nSystem:\r\n\r\n* behave 1.2.5\r\n* Python 3.3\r\n* Mac OS X 10.10"}}