{"action":"opened","number":124,"pull_request":{"url":"https://api.github.com/repos/krux/postscribe/pulls/124","id":45917067,"html_url":"https://github.com/krux/postscribe/pull/124","diff_url":"https://github.com/krux/postscribe/pull/124.diff","patch_url":"https://github.com/krux/postscribe/pull/124.patch","issue_url":"https://api.github.com/repos/krux/postscribe/issues/124","number":124,"state":"open","locked":false,"title":"Handle src attributes differently to all others","user":{"login":"debugwand","id":996106,"avatar_url":"https://avatars.githubusercontent.com/u/996106?v=3","gravatar_id":"","url":"https://api.github.com/users/debugwand","html_url":"https://github.com/debugwand","followers_url":"https://api.github.com/users/debugwand/followers","following_url":"https://api.github.com/users/debugwand/following{/other_user}","gists_url":"https://api.github.com/users/debugwand/gists{/gist_id}","starred_url":"https://api.github.com/users/debugwand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debugwand/subscriptions","organizations_url":"https://api.github.com/users/debugwand/orgs","repos_url":"https://api.github.com/users/debugwand/repos","events_url":"https://api.github.com/users/debugwand/events{/privacy}","received_events_url":"https://api.github.com/users/debugwand/received_events","type":"User","site_admin":false},"body":"Fix for #81 was a fix for strings that had already been serialized via outerHTML, but caused unserialized url strings to break.\r\n\r\nSpecificially for the #81 issue, the user was finding that src values with querystrings were broken as `&` got escaped to `&amp;` by outerHTML from the third-party script.\r\n\r\nWhile the fix for this specific case was to use `innerHTML` and then look at the textContent or innerText, for strings that haven't been already serialized (by outerHTML) `innerHTML` causes sequences like `&para` to get escaped to the paragraph symbol.  If a querystring for a script's src value contains `&param=something` then this sequence gets converted to `¶m=something` and the external script doesn't get all the data it needs - it just breaks.\r\n\r\nThis PR singles out the src attribute and handles them differently.  The `&#nnnn;` entity replacement is reinstated, `&amp;` gets converted to just `&`, and the string is uri-encoded.  No other conversions should be carried out on URLs.  The `unescapeHTMLEntities` is still in place for other attributes (though I am not sure what would require it).","created_at":"2015-09-24T16:12:02Z","updated_at":"2015-09-24T16:12:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/krux/postscribe/pulls/124/commits","review_comments_url":"https://api.github.com/repos/krux/postscribe/pulls/124/comments","review_comment_url":"https://api.github.com/repos/krux/postscribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/krux/postscribe/issues/124/comments","statuses_url":"https://api.github.com/repos/krux/postscribe/statuses/92b0976028c701d6dc098c1ac76e019aa0d40a2d","head":{"label":"debugwand:master","ref":"master","sha":"92b0976028c701d6dc098c1ac76e019aa0d40a2d","user":{"login":"debugwand","id":996106,"avatar_url":"https://avatars.githubusercontent.com/u/996106?v=3","gravatar_id":"","url":"https://api.github.com/users/debugwand","html_url":"https://github.com/debugwand","followers_url":"https://api.github.com/users/debugwand/followers","following_url":"https://api.github.com/users/debugwand/following{/other_user}","gists_url":"https://api.github.com/users/debugwand/gists{/gist_id}","starred_url":"https://api.github.com/users/debugwand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debugwand/subscriptions","organizations_url":"https://api.github.com/users/debugwand/orgs","repos_url":"https://api.github.com/users/debugwand/repos","events_url":"https://api.github.com/users/debugwand/events{/privacy}","received_events_url":"https://api.github.com/users/debugwand/received_events","type":"User","site_admin":false},"repo":{"id":43076690,"name":"postscribe","full_name":"debugwand/postscribe","owner":{"login":"debugwand","id":996106,"avatar_url":"https://avatars.githubusercontent.com/u/996106?v=3","gravatar_id":"","url":"https://api.github.com/users/debugwand","html_url":"https://github.com/debugwand","followers_url":"https://api.github.com/users/debugwand/followers","following_url":"https://api.github.com/users/debugwand/following{/other_user}","gists_url":"https://api.github.com/users/debugwand/gists{/gist_id}","starred_url":"https://api.github.com/users/debugwand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debugwand/subscriptions","organizations_url":"https://api.github.com/users/debugwand/orgs","repos_url":"https://api.github.com/users/debugwand/repos","events_url":"https://api.github.com/users/debugwand/events{/privacy}","received_events_url":"https://api.github.com/users/debugwand/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/debugwand/postscribe","description":"Asynchronously write javascript, even with document.write.","fork":true,"url":"https://api.github.com/repos/debugwand/postscribe","forks_url":"https://api.github.com/repos/debugwand/postscribe/forks","keys_url":"https://api.github.com/repos/debugwand/postscribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/debugwand/postscribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/debugwand/postscribe/teams","hooks_url":"https://api.github.com/repos/debugwand/postscribe/hooks","issue_events_url":"https://api.github.com/repos/debugwand/postscribe/issues/events{/number}","events_url":"https://api.github.com/repos/debugwand/postscribe/events","assignees_url":"https://api.github.com/repos/debugwand/postscribe/assignees{/user}","branches_url":"https://api.github.com/repos/debugwand/postscribe/branches{/branch}","tags_url":"https://api.github.com/repos/debugwand/postscribe/tags","blobs_url":"https://api.github.com/repos/debugwand/postscribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/debugwand/postscribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/debugwand/postscribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/debugwand/postscribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/debugwand/postscribe/statuses/{sha}","languages_url":"https://api.github.com/repos/debugwand/postscribe/languages","stargazers_url":"https://api.github.com/repos/debugwand/postscribe/stargazers","contributors_url":"https://api.github.com/repos/debugwand/postscribe/contributors","subscribers_url":"https://api.github.com/repos/debugwand/postscribe/subscribers","subscription_url":"https://api.github.com/repos/debugwand/postscribe/subscription","commits_url":"https://api.github.com/repos/debugwand/postscribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/debugwand/postscribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/debugwand/postscribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/debugwand/postscribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/debugwand/postscribe/contents/{+path}","compare_url":"https://api.github.com/repos/debugwand/postscribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/debugwand/postscribe/merges","archive_url":"https://api.github.com/repos/debugwand/postscribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/debugwand/postscribe/downloads","issues_url":"https://api.github.com/repos/debugwand/postscribe/issues{/number}","pulls_url":"https://api.github.com/repos/debugwand/postscribe/pulls{/number}","milestones_url":"https://api.github.com/repos/debugwand/postscribe/milestones{/number}","notifications_url":"https://api.github.com/repos/debugwand/postscribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/debugwand/postscribe/labels{/name}","releases_url":"https://api.github.com/repos/debugwand/postscribe/releases{/id}","created_at":"2015-09-24T15:48:59Z","updated_at":"2015-09-24T15:49:00Z","pushed_at":"2015-09-24T15:55:19Z","git_url":"git://github.com/debugwand/postscribe.git","ssh_url":"git@github.com:debugwand/postscribe.git","clone_url":"https://github.com/debugwand/postscribe.git","svn_url":"https://github.com/debugwand/postscribe","homepage":"","size":1186,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"krux:master","ref":"master","sha":"50e5762f35ba7978903583bae55540a82e64d353","user":{"login":"krux","id":72871,"avatar_url":"https://avatars.githubusercontent.com/u/72871?v=3","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"repo":{"id":6097677,"name":"postscribe","full_name":"krux/postscribe","owner":{"login":"krux","id":72871,"avatar_url":"https://avatars.githubusercontent.com/u/72871?v=3","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/krux/postscribe","description":"Asynchronously write javascript, even with document.write.","fork":false,"url":"https://api.github.com/repos/krux/postscribe","forks_url":"https://api.github.com/repos/krux/postscribe/forks","keys_url":"https://api.github.com/repos/krux/postscribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krux/postscribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krux/postscribe/teams","hooks_url":"https://api.github.com/repos/krux/postscribe/hooks","issue_events_url":"https://api.github.com/repos/krux/postscribe/issues/events{/number}","events_url":"https://api.github.com/repos/krux/postscribe/events","assignees_url":"https://api.github.com/repos/krux/postscribe/assignees{/user}","branches_url":"https://api.github.com/repos/krux/postscribe/branches{/branch}","tags_url":"https://api.github.com/repos/krux/postscribe/tags","blobs_url":"https://api.github.com/repos/krux/postscribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krux/postscribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krux/postscribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/krux/postscribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krux/postscribe/statuses/{sha}","languages_url":"https://api.github.com/repos/krux/postscribe/languages","stargazers_url":"https://api.github.com/repos/krux/postscribe/stargazers","contributors_url":"https://api.github.com/repos/krux/postscribe/contributors","subscribers_url":"https://api.github.com/repos/krux/postscribe/subscribers","subscription_url":"https://api.github.com/repos/krux/postscribe/subscription","commits_url":"https://api.github.com/repos/krux/postscribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/krux/postscribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/krux/postscribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/krux/postscribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/krux/postscribe/contents/{+path}","compare_url":"https://api.github.com/repos/krux/postscribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krux/postscribe/merges","archive_url":"https://api.github.com/repos/krux/postscribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krux/postscribe/downloads","issues_url":"https://api.github.com/repos/krux/postscribe/issues{/number}","pulls_url":"https://api.github.com/repos/krux/postscribe/pulls{/number}","milestones_url":"https://api.github.com/repos/krux/postscribe/milestones{/number}","notifications_url":"https://api.github.com/repos/krux/postscribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krux/postscribe/labels{/name}","releases_url":"https://api.github.com/repos/krux/postscribe/releases{/id}","created_at":"2012-10-05T22:34:49Z","updated_at":"2015-09-23T14:55:11Z","pushed_at":"2015-09-22T09:38:32Z","git_url":"git://github.com/krux/postscribe.git","ssh_url":"git@github.com:krux/postscribe.git","clone_url":"https://github.com/krux/postscribe.git","svn_url":"https://github.com/krux/postscribe","homepage":"","size":1186,"stargazers_count":451,"watchers_count":451,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":39,"forks":87,"open_issues":39,"watchers":451,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/krux/postscribe/pulls/124"},"html":{"href":"https://github.com/krux/postscribe/pull/124"},"issue":{"href":"https://api.github.com/repos/krux/postscribe/issues/124"},"comments":{"href":"https://api.github.com/repos/krux/postscribe/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/krux/postscribe/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/krux/postscribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/krux/postscribe/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/krux/postscribe/statuses/92b0976028c701d6dc098c1ac76e019aa0d40a2d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":24,"deletions":3,"changed_files":2}}