-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backslash not escaped by TransferState #1382
Comments
@SanderElias Can this be fixed by extending the special char escaping arrays? If yes, is that a safe approach? I mean this list and it's escaped pair:
If yes, I'm going to open a PR for it. |
@hunhavoc That is what I tried initially, but it doesn't work. It needs a bit more. For testing, put a {
id: 2,
name: 'Ervin `Howell`',
username: 'Anton\\ette',
email: 'Shanna@melissa.tv',
address: {
street: 'Victor Plains',
suite: 'Suite 879',
city: 'Wisokyburgh',
zipcode: '90566-7771',
geo: {
lat: '-43.9509',
lng: '-34.4618',
},
},
phone: '010-692-6593 x09125',
website: 'anastasia.net',
company: {
name: 'Deckow-Crist',
catchPhrase: 'Proactive \n```\nconsole.log("euhm")\n```\n didactic contingency',
bs: 'synergize scalable supply-chains',
},
}, If you can find out a way to do that, and pass all the tests. I'm more than willing to merge a PR. |
🐞 Bug report
Description
Having data like
{"amount": "450\45g"}
breaks the page when data is read from the TransferState script onJSON.parse()
. It works great when it's received by thedata.json
though.🔬 Minimal Reproduction
Pass
{"amount": "450\45g"}
to TransferState and load the page directly.💻Your Environment
Angular Version:
Scully Version:
🔥 Exception or Error
JSON.parse fails on
\4
The text was updated successfully, but these errors were encountered: