Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Strings with backslashes (\) cause errors #44

Open
rosswintle opened this issue Mar 18, 2022 · 0 comments
Open

Strings with backslashes (\) cause errors #44

rosswintle opened this issue Mar 18, 2022 · 0 comments

Comments

@rosswintle
Copy link

I can't see this logged anywhere, but strings with \ raise errors.

I'm seeing this in the data saved by wp_queue

A minimal case would be:

O:14:"Simpsons\Homer":1:{s:14:"favouriteDrink";s:9:"Duff Beer";}

This outputs:

CleanShot 2022-03-18 at 17 02 22

And the console shows:

SyntaxError: JSON.parse: bad escaped character at line 1 column 33 of the JSON data

CleanShot 2022-03-18 at 17 03 45

Changing the \ to - fixes the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant