Closed thiagovito closed 3 years ago
Same problem on IOS
@thiagovito thanks for reaching out, hey so would you mind to send a PR to development with the patches you did to make it work.
I can publish that with the next version 2.2.0 which is about to be published.
Cheers Jon
What type of issue are you creating?
What version of this module are you using?
Write other if any: 2.1.2
Please add a description for your issue:
Guys,
We experienced a bug that happens only on iOS (Safari and Chrome). It happens when trying to store cookie with special characters such as (àáâãèéê, etc).
The error we get is "JSON Parse error: Unterminated string". We get this problem because if there is any of these characters the JSON string brakes in: $LoopBackSDK$user
So to solve that we have changed the following file:
sdk/storage/stcookie.browser.ts
we have added:
encodeURI(value)
in the set methodand
decodeURI(value)
in parse method.So that cookies are saved with special characters