{"action":"created","issue":{"url":"https://api.github.com/repos/js-cookie/js-cookie/issues/70","labels_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/70/comments","events_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/70/events","html_url":"https://github.com/js-cookie/js-cookie/issues/70","id":98352460,"number":70,"title":"Optional encoder function, in addition to decoder (converter)","user":{"login":"dezlov","id":7993917,"avatar_url":"https://avatars.githubusercontent.com/u/7993917?v=3","gravatar_id":"","url":"https://api.github.com/users/dezlov","html_url":"https://github.com/dezlov","followers_url":"https://api.github.com/users/dezlov/followers","following_url":"https://api.github.com/users/dezlov/following{/other_user}","gists_url":"https://api.github.com/users/dezlov/gists{/gist_id}","starred_url":"https://api.github.com/users/dezlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dezlov/subscriptions","organizations_url":"https://api.github.com/users/dezlov/orgs","repos_url":"https://api.github.com/users/dezlov/repos","events_url":"https://api.github.com/users/dezlov/events{/privacy}","received_events_url":"https://api.github.com/users/dezlov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/js-cookie/js-cookie/milestones/2","html_url":"https://github.com/js-cookie/js-cookie/milestones/v2.1.0","labels_url":"https://api.github.com/repos/js-cookie/js-cookie/milestones/2/labels","id":1257029,"number":2,"title":"v2.1.0","description":"","creator":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":1,"state":"open","created_at":"2015-08-16T18:25:39Z","updated_at":"2015-09-29T02:07:33Z","due_on":null,"closed_at":null},"comments":29,"created_at":"2015-07-31T09:32:02Z","updated_at":"2015-10-02T21:40:16Z","closed_at":null,"body":"This will allow for ultimate customization and compatibility with other cookie encoding functions.\r\n\r\nIt could be added as an extension to `Cookies.withConverter()` to allow specifying an encoding function too.\r\n\r\nFor example, the incompatibility with PHP cannot be resolved because this JS library will always store \"+\" signs in plain text, while PHP will always convert them to spaces when read.\r\n\r\nIn PHP, both `$_COOKIE` and `filter_input(INPUT_COOKIE)` will return already decoded value, where all \"+\" signs will be converted to spaces. There is a `setrawcookie`, but no `getrawcookie` function, so no way around it in PHP (without having to manually double encode and decode in both languages)."},"comment":{"url":"https://api.github.com/repos/js-cookie/js-cookie/issues/comments/145161350","html_url":"https://github.com/js-cookie/js-cookie/issues/70#issuecomment-145161350","issue_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/70","id":145161350,"user":{"login":"dezlov","id":7993917,"avatar_url":"https://avatars.githubusercontent.com/u/7993917?v=3","gravatar_id":"","url":"https://api.github.com/users/dezlov","html_url":"https://github.com/dezlov","followers_url":"https://api.github.com/users/dezlov/followers","following_url":"https://api.github.com/users/dezlov/following{/other_user}","gists_url":"https://api.github.com/users/dezlov/gists{/gist_id}","starred_url":"https://api.github.com/users/dezlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dezlov/subscriptions","organizations_url":"https://api.github.com/users/dezlov/orgs","repos_url":"https://api.github.com/users/dezlov/repos","events_url":"https://api.github.com/users/dezlov/events{/privacy}","received_events_url":"https://api.github.com/users/dezlov/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T21:40:16Z","updated_at":"2015-10-02T21:40:16Z","body":"I've left a comment at https://github.com/js-cookie/js-cookie/commit/8b2a1392c18bc32833730b6c596bfe769354a0cf#commitcomment-13571492 about few issues with that commit.\r\n\r\nA suggestion: Instead of supplying very cumbersome `Cookies.withConverter({...})` for PHP, Rack, and possibly other platforms - why not built them into the library as say `Cookies.withPHPConverter()`?\r\n\r\nOtherwise people are likely to miss info in `SERVERS.md` or may find it too cumbersome to use in every project."}}