humanmade / humanmade/extendable-aggregator
Issue when syncing JSON stored in meta
- Dominant language
- PHP
- Stars
- 7
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
In certain scenarios the plugin can cause issues when syncing JSON stored in meta.
An example of this is when paired with the NewsPress plugin "Multi Title Support" which stores a headline of the post, along with other attributes such as a kicker as JSON in a single meta field.
If a headline is created that contains speech marks, such as `This is my "Example" headline`, the JSON will look a little like the following with the speech marks slashed:
```
{"titles":{"headline":{"value":" This is my \"Example\" headline"}}}
```
This is copied using the following method:
https://github.com/humanmade/extendable-aggregator/blob/52be9bd8ee9b28272a11261d00cef6f4d7ee6994/inc/syncable/class-post.php#L159-L162
This uses `update_post_meta` which under the hood performs runs a remove slash function. This breaks the JSON stored in the meta field, and breaks the block in the editor.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.