{"action":"created","comment":{"url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/comments/71014825","id":71014825,"diff_hunk":"@@ -91,30 +98,14 @@ function do_save_post( $post ) {\n \t\t}\n \n \t\t// handle base64 image string if provided\n-\t\tif ( ! empty( $_POST['simplechart-png-string'] ) ) {\n-\t\t\t$this->_save_chart_image( $post, $_POST['simplechart-png-string'], $this->_default_img_type );\n+\t\tif ( ! empty( $_POST['save-previewImg'] ) ) {\n+\t\t\t$this->_save_chart_image( $post, $_POST['save-previewImg'], $this->_default_img_type );\n \t\t}\n \n-\t\t// sanitize and validate JSON formatting of chart data\n-\t\t$json_data = $this->_validate_json( stripslashes( $_POST['simplechart-data'] ) );\n-\t\tif ( $json_data ) {\n-\t\t\tupdate_post_meta( $post->ID, 'simplechart-data',  $json_data );\n-\t\t}\n-\n-\t\t// validate template HTML fragment\n-\t\t$template_fragment = $this->validate_template_fragment( stripslashes( $_POST['simplechart-template'] ) );\n-\t\tif ( $template_fragment ) {\n-\t\t\tupdate_post_meta( $post->ID, 'simplechart-template',  $template_fragment );\n-\t\t}\n-\n-\t\t// save chart URL if provided\n-\t\tif ( ! empty( $_POST['simplechart-chart-url'] ) ) {\n-\t\t\tupdate_post_meta( $post->ID, 'simplechart-chart-url',  esc_url( $_POST['simplechart-chart-url'] ) );\n-\t\t}\n-\n-\t\t// save chart ID if provided\n-\t\tif ( ! empty( $_POST['simplechart-chart-id'] ) ) {\n-\t\t\tupdate_post_meta( $post->ID, 'simplechart-chart-id',  sanitize_text_field( $_POST['simplechart-chart-id'] ) );\n+\t\tforeach ( $this->meta_field_names as $field ) {\n+\t\t\tif ( ! empty( $_POST[ 'save-' . $field ] ) ) {\n+\t\t\t\tupdate_post_meta( $post->ID, 'save-' . $field, $_POST[ 'save-' . $field ] );","path":"modules/class-simplechart-save.php","position":46,"original_position":46,"commit_id":"dd65f5fdb957baa5c1e2447c9e4ac59bcb68dc1f","original_commit_id":"a26e95710f4e3e52a61f79664fc0bb6e18dd9a29","user":{"login":"scottnelle","id":2235527,"avatar_url":"https://avatars.githubusercontent.com/u/2235527?v=3","gravatar_id":"","url":"https://api.github.com/users/scottnelle","html_url":"https://github.com/scottnelle","followers_url":"https://api.github.com/users/scottnelle/followers","following_url":"https://api.github.com/users/scottnelle/following{/other_user}","gists_url":"https://api.github.com/users/scottnelle/gists{/gist_id}","starred_url":"https://api.github.com/users/scottnelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottnelle/subscriptions","organizations_url":"https://api.github.com/users/scottnelle/orgs","repos_url":"https://api.github.com/users/scottnelle/repos","events_url":"https://api.github.com/users/scottnelle/events{/privacy}","received_events_url":"https://api.github.com/users/scottnelle/received_events","type":"User","site_admin":false},"body":"Maybe? It passes to `update_metadata()` which passes to `sanitize_meta()` which applies filters based on the meta type and meta key. It further runs through some filters for the meta type. You can always see what VIP has to say. I suspect they'll ask you to sanitize early.","created_at":"2016-07-15T17:58:15Z","updated_at":"2016-07-15T17:58:15Z","html_url":"https://github.com/alleyinteractive/wordpress-simplechart/pull/39#discussion_r71014825","pull_request_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/comments/71014825"},"html":{"href":"https://github.com/alleyinteractive/wordpress-simplechart/pull/39#discussion_r71014825"},"pull_request":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39","id":77359577,"html_url":"https://github.com/alleyinteractive/wordpress-simplechart/pull/39","diff_url":"https://github.com/alleyinteractive/wordpress-simplechart/pull/39.diff","patch_url":"https://github.com/alleyinteractive/wordpress-simplechart/pull/39.patch","issue_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/39","number":39,"state":"open","locked":false,"title":"React/postmessage interface","user":{"login":"joshkadis","id":997097,"avatar_url":"https://avatars.githubusercontent.com/u/997097?v=3","gravatar_id":"","url":"https://api.github.com/users/joshkadis","html_url":"https://github.com/joshkadis","followers_url":"https://api.github.com/users/joshkadis/followers","following_url":"https://api.github.com/users/joshkadis/following{/other_user}","gists_url":"https://api.github.com/users/joshkadis/gists{/gist_id}","starred_url":"https://api.github.com/users/joshkadis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshkadis/subscriptions","organizations_url":"https://api.github.com/users/joshkadis/orgs","repos_url":"https://api.github.com/users/joshkadis/repos","events_url":"https://api.github.com/users/joshkadis/events{/privacy}","received_events_url":"https://api.github.com/users/joshkadis/received_events","type":"User","site_admin":false},"body":"Update how data is handled and saved by plugin to match the new data structure.","created_at":"2016-07-13T20:51:42Z","updated_at":"2016-07-15T17:58:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59fc31711662d5a9e4577963bba8e773fceb227a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39/commits","review_comments_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39/comments","review_comment_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/39/comments","statuses_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/statuses/dd65f5fdb957baa5c1e2447c9e4ac59bcb68dc1f","head":{"label":"alleyinteractive:react/postmessage-interface","ref":"react/postmessage-interface","sha":"dd65f5fdb957baa5c1e2447c9e4ac59bcb68dc1f","user":{"login":"alleyinteractive","id":1733454,"avatar_url":"https://avatars.githubusercontent.com/u/1733454?v=3","gravatar_id":"","url":"https://api.github.com/users/alleyinteractive","html_url":"https://github.com/alleyinteractive","followers_url":"https://api.github.com/users/alleyinteractive/followers","following_url":"https://api.github.com/users/alleyinteractive/following{/other_user}","gists_url":"https://api.github.com/users/alleyinteractive/gists{/gist_id}","starred_url":"https://api.github.com/users/alleyinteractive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alleyinteractive/subscriptions","organizations_url":"https://api.github.com/users/alleyinteractive/orgs","repos_url":"https://api.github.com/users/alleyinteractive/repos","events_url":"https://api.github.com/users/alleyinteractive/events{/privacy}","received_events_url":"https://api.github.com/users/alleyinteractive/received_events","type":"Organization","site_admin":false},"repo":{"id":30622191,"name":"wordpress-simplechart","full_name":"alleyinteractive/wordpress-simplechart","owner":{"login":"alleyinteractive","id":1733454,"avatar_url":"https://avatars.githubusercontent.com/u/1733454?v=3","gravatar_id":"","url":"https://api.github.com/users/alleyinteractive","html_url":"https://github.com/alleyinteractive","followers_url":"https://api.github.com/users/alleyinteractive/followers","following_url":"https://api.github.com/users/alleyinteractive/following{/other_user}","gists_url":"https://api.github.com/users/alleyinteractive/gists{/gist_id}","starred_url":"https://api.github.com/users/alleyinteractive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alleyinteractive/subscriptions","organizations_url":"https://api.github.com/users/alleyinteractive/orgs","repos_url":"https://api.github.com/users/alleyinteractive/repos","events_url":"https://api.github.com/users/alleyinteractive/events{/privacy}","received_events_url":"https://api.github.com/users/alleyinteractive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alleyinteractive/wordpress-simplechart","description":"Create and render interactive charts in WordPress using Simplechart","fork":false,"url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart","forks_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/forks","keys_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/teams","hooks_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/hooks","issue_events_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/events{/number}","events_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/events","assignees_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/assignees{/user}","branches_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/branches{/branch}","tags_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/tags","blobs_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/refs{/sha}","trees_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/statuses/{sha}","languages_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/languages","stargazers_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/stargazers","contributors_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/contributors","subscribers_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/subscribers","subscription_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/subscription","commits_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/commits{/sha}","git_commits_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/commits{/sha}","comments_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/comments{/number}","issue_comment_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/comments{/number}","contents_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/contents/{+path}","compare_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/merges","archive_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/downloads","issues_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues{/number}","pulls_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls{/number}","milestones_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/milestones{/number}","notifications_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/labels{/name}","releases_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/releases{/id}","deployments_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/deployments","created_at":"2015-02-11T00:28:03Z","updated_at":"2016-07-12T12:33:07Z","pushed_at":"2016-07-15T17:57:32Z","git_url":"git://github.com/alleyinteractive/wordpress-simplechart.git","ssh_url":"git@github.com:alleyinteractive/wordpress-simplechart.git","clone_url":"https://github.com/alleyinteractive/wordpress-simplechart.git","svn_url":"https://github.com/alleyinteractive/wordpress-simplechart","homepage":"","size":7883,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"alleyinteractive:react/react-app-base","ref":"react/react-app-base","sha":"3b23450ccaa55be20140de90d80992f4439796c0","user":{"login":"alleyinteractive","id":1733454,"avatar_url":"https://avatars.githubusercontent.com/u/1733454?v=3","gravatar_id":"","url":"https://api.github.com/users/alleyinteractive","html_url":"https://github.com/alleyinteractive","followers_url":"https://api.github.com/users/alleyinteractive/followers","following_url":"https://api.github.com/users/alleyinteractive/following{/other_user}","gists_url":"https://api.github.com/users/alleyinteractive/gists{/gist_id}","starred_url":"https://api.github.com/users/alleyinteractive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alleyinteractive/subscriptions","organizations_url":"https://api.github.com/users/alleyinteractive/orgs","repos_url":"https://api.github.com/users/alleyinteractive/repos","events_url":"https://api.github.com/users/alleyinteractive/events{/privacy}","received_events_url":"https://api.github.com/users/alleyinteractive/received_events","type":"Organization","site_admin":false},"repo":{"id":30622191,"name":"wordpress-simplechart","full_name":"alleyinteractive/wordpress-simplechart","owner":{"login":"alleyinteractive","id":1733454,"avatar_url":"https://avatars.githubusercontent.com/u/1733454?v=3","gravatar_id":"","url":"https://api.github.com/users/alleyinteractive","html_url":"https://github.com/alleyinteractive","followers_url":"https://api.github.com/users/alleyinteractive/followers","following_url":"https://api.github.com/users/alleyinteractive/following{/other_user}","gists_url":"https://api.github.com/users/alleyinteractive/gists{/gist_id}","starred_url":"https://api.github.com/users/alleyinteractive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alleyinteractive/subscriptions","organizations_url":"https://api.github.com/users/alleyinteractive/orgs","repos_url":"https://api.github.com/users/alleyinteractive/repos","events_url":"https://api.github.com/users/alleyinteractive/events{/privacy}","received_events_url":"https://api.github.com/users/alleyinteractive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alleyinteractive/wordpress-simplechart","description":"Create and render interactive charts in WordPress using Simplechart","fork":false,"url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart","forks_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/forks","keys_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/teams","hooks_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/hooks","issue_events_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/events{/number}","events_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/events","assignees_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/assignees{/user}","branches_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/branches{/branch}","tags_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/tags","blobs_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/refs{/sha}","trees_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/statuses/{sha}","languages_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/languages","stargazers_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/stargazers","contributors_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/contributors","subscribers_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/subscribers","subscription_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/subscription","commits_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/commits{/sha}","git_commits_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/git/commits{/sha}","comments_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/comments{/number}","issue_comment_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/comments{/number}","contents_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/contents/{+path}","compare_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/merges","archive_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/downloads","issues_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues{/number}","pulls_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls{/number}","milestones_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/milestones{/number}","notifications_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/labels{/name}","releases_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/releases{/id}","deployments_url":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/deployments","created_at":"2015-02-11T00:28:03Z","updated_at":"2016-07-12T12:33:07Z","pushed_at":"2016-07-15T17:57:32Z","git_url":"git://github.com/alleyinteractive/wordpress-simplechart.git","ssh_url":"git@github.com:alleyinteractive/wordpress-simplechart.git","clone_url":"https://github.com/alleyinteractive/wordpress-simplechart.git","svn_url":"https://github.com/alleyinteractive/wordpress-simplechart","homepage":"","size":7883,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39"},"html":{"href":"https://github.com/alleyinteractive/wordpress-simplechart/pull/39"},"issue":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/39"},"comments":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/alleyinteractive/wordpress-simplechart/statuses/dd65f5fdb957baa5c1e2447c9e4ac59bcb68dc1f"}}}}
{"actor":{"display_login":"scottnelle"}}