patternmb
Forum Replies Created
-
Forum: Plugins
In reply to: [Enable Media Replace] Version 3.4.2 breaks json, suggested fixI’ve just tested it and confirmed that it is working great. Thank you @sixaxis for you and your teams excellent support!
Forum: Plugins
In reply to: [Enable Media Replace] Version 3.4.2 breaks json, suggested fixIn my case I have JSON stored in the post_content field in the wp_posts table, it looks like this:
[["Column A","Info Doc"],["Column B","<a href=\"https://example.com/wp-content/uploads/2020/02/old-doc.pdf\">PDF</a>\n<a href=\"https://example.com/wp-content/uploads/2020/02/old-doc2.pdf\">PDF</a>"]]Then when I replace the file with the option “Replace the file, use new file name and update all links” the JSON ends up looking like this:
[["Column A","Info Doc"],["Column B","<a href="https://example.com/wp-content/uploads/2020/02/new-doc.pdf">PDF</a>n<a href="https://example.com/wp-content/uploads/2020/02/new-doc2.pdf\">PDF</a>"]]The escaping backslashes are removed on quotes and newlines (\n). For me
wp_slashseems to prevent this from happening. I think by adding extra slashes whichwp_update_postremoves by callingstripslashes_deep.The plugin I am using is the latest version (1.12) of TablePress by Tobias Bäthge. It creates tables which is stored as a custom post type in wp_posts. I am also using WordPress 5.5.1.
I hope this helps!
Thank you for the update. I’ve just tried 3.3 and everything is looking good.
Awesome, I look forward to 3.3. I’ll retest my code when it comes out and if there are no issues we can mark this as resolved.
Thanks!