{"id":12917409,"date":"2020-05-31T11:34:12","date_gmt":"2020-05-31T11:34:12","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/javascript-in-json-responses\/"},"modified":"2020-05-31T11:34:12","modified_gmt":"2020-05-31T11:34:12","slug":"javascript-in-json-responses","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/javascript-in-json-responses\/","title":{"rendered":"JavaScript in JSON responses"},"content":{"rendered":"<p>Hi,<\/p>\n<p>your plugin is inserting a JavaScript code also to JSON responses from WordPress, which is corrupting them &#8211; this is happening, for example, when editing a page and is resulting in error &#8220;The response is not a valid JSON response.&#8221; after saving changes. WordPress version 5.4.1.<\/p>\n<p>As a fix, i suggest to exclude responses with content type application\/json from inserting a JavaScript.<\/p>\n","protected":false},"template":"","class_list":["post-12917409","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12917409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12917409\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12917409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}