{"action":"created","issue":{"url":"https://api.github.com/repos/mjs/imapclient/issues/26","labels_url":"https://api.github.com/repos/mjs/imapclient/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/mjs/imapclient/issues/26/comments","events_url":"https://api.github.com/repos/mjs/imapclient/issues/26/events","html_url":"https://github.com/mjs/imapclient/issues/26","id":120287060,"number":26,"title":"Mailbox names with escaped chars them aren't returned correctly","user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-03T22:34:56Z","updated_at":"2015-12-03T22:35:01Z","closed_at":"2015-12-03T22:34:57Z","body":"'Test \"folder\"' is returned by list_folders() as 'Test \\'\n\nEscaping needs to be handled correctly.\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/mjs0/imapclient/issue/28\n- Originally reported by: Menno Smits\n- Originally created at: 2009-12-18T17:53:15\n"},"comment":{"url":"https://api.github.com/repos/mjs/imapclient/issues/comments/161810182","html_url":"https://github.com/mjs/imapclient/issues/26#issuecomment-161810182","issue_url":"https://api.github.com/repos/mjs/imapclient/issues/26","id":161810182,"user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T22:35:01Z","updated_at":"2015-12-03T22:35:01Z","body":"Working with trunk (r139), it looks like it again does the wrong thing with a gmail folder name that begins with quotes (as opposed to merely containing them); a folder named\r\n   \"Make\" Magazine (ORA)\r\nbecomes\r\n   Make\" Magazine (ORA\r\n\r\nTurning off this bit of re-unquoting from r103 fixes my case, but I don't know if it impacts non-gmail IMAP servers...\r\n\r\ndiff -r be5626eee037 imapclient/response_parser.py\r\n--- a/imapclient/response_parser.py\tWed Mar 17 02:10:37 2010 +0000\r\n+++ b/imapclient/response_parser.py\tWed Mar 17 02:13:56 2010 -0400\r\n@@ -207,8 +207,8 @@\r\n             raise ParseError('Expecting literal of size %d, got %d' % (\r\n                                 literal_len, len(literal_text)))\r\n         return literal_text\r\n-    elif token.startswith('\"'):\r\n-        return token[1:-1]\r\n+    #elif token.startswith('\"'):\r\n+    #    return token[1:-1]\r\n     elif token.isdigit():\r\n         return int(token)\r\n     else:\n\n----------------------------------------\nOriginal comment by: Mark Eichin\n"}}