{"action":"created","issue":{"url":"https://api.github.com/repos/pieroxy/lz-string/issues/72","labels_url":"https://api.github.com/repos/pieroxy/lz-string/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/pieroxy/lz-string/issues/72/comments","events_url":"https://api.github.com/repos/pieroxy/lz-string/issues/72/events","html_url":"https://github.com/pieroxy/lz-string/issues/72","id":129770918,"number":72,"title":"decompressFromEncodeURIComponent fails","user":{"login":"dgstpierre","id":6135721,"avatar_url":"https://avatars.githubusercontent.com/u/6135721?v=3","gravatar_id":"","url":"https://api.github.com/users/dgstpierre","html_url":"https://github.com/dgstpierre","followers_url":"https://api.github.com/users/dgstpierre/followers","following_url":"https://api.github.com/users/dgstpierre/following{/other_user}","gists_url":"https://api.github.com/users/dgstpierre/gists{/gist_id}","starred_url":"https://api.github.com/users/dgstpierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgstpierre/subscriptions","organizations_url":"https://api.github.com/users/dgstpierre/orgs","repos_url":"https://api.github.com/users/dgstpierre/repos","events_url":"https://api.github.com/users/dgstpierre/events{/privacy}","received_events_url":"https://api.github.com/users/dgstpierre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-29T13:51:05Z","updated_at":"2016-01-30T16:06:57Z","closed_at":null,"body":"Using the 1.4.4 version of your javascript file, after I compress a string with LZString.compressToEncodedURIComponent(), and then call  LZString.decompressFromEncodedURIComponent() on it, it fails 3 quarters of the way through not being able to find an entry in the dictionary and returns null:\r\n      } else {\r\n        if (c === dictSize) {\r\n          entry = w + w.charAt(0);\r\n        } else {\r\n          return null;\r\n        }\r\n      }\r\n\r\n  Any idea why?  I'm testing with Internet Explorer 11.  The decompress call is below...\r\n\r\n        var test = LZString.decompressFromEncodedURIComponent(\"N4IgpgliBc4G4EYC0CQBoQCcCOVY4QGpUMBnSGEcxAEhJAGMHKBVAZXSzyzFIAd6pbvTgAXSgHsAiiwASAdwBqAJgCuADgAW62QDMAwgHFCAMQBsAEQA2AEwBymALJg2 + 0QGY7ZgEYBWOLJsLABKDACeAFIAHgDmALycfNzKAAxoaWnKAOzKAD6 + aAhoACwIymXpuWAAdgCG3lZgNrkIRRmVuZ1duZw2fJQAggC2YJgQDLUA9HZg8gD6AJoSmADWucq + ZikAGgjFxSnrxUjKxbmimKpguQDqENXueQjqAJwvuY9nuYcAKpqqAAIIrVqgDlOoAQh3NBfAhoAcAQBRNg - MEpBBmD4pQ41JDsc6Xa4XK75GIALWUMUcVgssikCH0 + mKUhWtXUcCsAAU2CZMCwJBFisETEIADIREx2CwxBhkgDSLGKcVJFKpNLpDKZLLZHM5P0mpCkb3cFj4tQQUTM2AA8j8bmSFikYvJlbldLUrOROGB + rAWp1DocNlsWu51Fl1m6srV3GYXspamANt53Lpii9SuozLpsylfC8UgcGC9dN8y3kg2WA5w4L7QGAhpQbLU4BAbAABYm8WpDPiNAB0DAkjYwfE0MGqqisVjIojAlFhANFYQk1VIAJutTCnAY3Dsy1EmgBA2qNgkcFGnFI4lgjgGiWYsHR6mKvl6jdgXdIPb7YEHw84aoPxACwWzbAE2FEfsAU5CBRkwecMHkUhKE0URRD4aBJkmeRcP7L8fwHIdGwAXwwGxHwAbSKZQAF0MAuGAuxIoA\");\r\n"},"comment":{"url":"https://api.github.com/repos/pieroxy/lz-string/issues/comments/177220613","html_url":"https://github.com/pieroxy/lz-string/issues/72#issuecomment-177220613","issue_url":"https://api.github.com/repos/pieroxy/lz-string/issues/72","id":177220613,"user":{"login":"pieroxy","id":1426854,"avatar_url":"https://avatars.githubusercontent.com/u/1426854?v=3","gravatar_id":"","url":"https://api.github.com/users/pieroxy","html_url":"https://github.com/pieroxy","followers_url":"https://api.github.com/users/pieroxy/followers","following_url":"https://api.github.com/users/pieroxy/following{/other_user}","gists_url":"https://api.github.com/users/pieroxy/gists{/gist_id}","starred_url":"https://api.github.com/users/pieroxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieroxy/subscriptions","organizations_url":"https://api.github.com/users/pieroxy/orgs","repos_url":"https://api.github.com/users/pieroxy/repos","events_url":"https://api.github.com/users/pieroxy/events{/privacy}","received_events_url":"https://api.github.com/users/pieroxy/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T16:06:57Z","updated_at":"2016-01-30T16:06:57Z","body":"The URI escaping is just (If I understand the issue correctly) converting '+' to spaces. A quick fix for you might be to convert all spaces to '+' before trying to decompress the String.\r\n\r\nAs this is a common problem, I might include this behavior in the lib. I'm just waiting for you to confirm that it would solve the issue."}}