{"action":"created","issue":{"url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3152","repository_url":"https://api.github.com/repos/wp-cli/wp-cli","labels_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3152/labels{/name}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3152/comments","events_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3152/events","html_url":"https://github.com/wp-cli/wp-cli/issues/3152","id":165351387,"number":3152,"title":"Backslashes are eaten ","user":{"login":"TimothyBJacobs","id":3460448,"avatar_url":"https://avatars.githubusercontent.com/u/3460448?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyBJacobs","html_url":"https://github.com/TimothyBJacobs","followers_url":"https://api.github.com/users/TimothyBJacobs/followers","following_url":"https://api.github.com/users/TimothyBJacobs/following{/other_user}","gists_url":"https://api.github.com/users/TimothyBJacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyBJacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyBJacobs/subscriptions","organizations_url":"https://api.github.com/users/TimothyBJacobs/orgs","repos_url":"https://api.github.com/users/TimothyBJacobs/repos","events_url":"https://api.github.com/users/TimothyBJacobs/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyBJacobs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wp-cli/wp-cli/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/wp-cli/wp-cli/labels/command:post","name":"command:post","color":"c7def8"},{"url":"https://api.github.com/repos/wp-cli/wp-cli/labels/command:post-create","name":"command:post-create","color":"c5def5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-13T15:32:31Z","updated_at":"2016-07-14T12:51:55Z","closed_at":null,"body":"Backslashes are eaten by the post command.\r\n\r\n`wp post create --post_title=\"My\\Post\" --post_content=\"My\\Best\\Post\"`\r\n\r\n```\r\n+--------------+------------+\r\n| Field        | Value      |\r\n+--------------+------------+\r\n| post_content | MyBestPost |\r\n| post_title   | MyPost     |\r\n+--------------+------------+\r\n```\r\n\r\nBackslashes are valid post content and should remain. \r\n\r\n`wp_insert_post()` expects slashed data, so the post command should probably `addslashes` the `$params` before inserting the post. This probably applies to other commands, but I didn't take a deeper look."},"comment":{"url":"https://api.github.com/repos/wp-cli/wp-cli/issues/comments/232656497","html_url":"https://github.com/wp-cli/wp-cli/issues/3152#issuecomment-232656497","issue_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3152","id":232656497,"user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T12:51:55Z","updated_at":"2016-07-14T12:51:55Z","body":"Previously #1923"}}
{"actor":{"display_login":"danielbachhuber"}}