{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react/pulls/comments/48376123","id":48376123,"diff_hunk":"@@ -260,6 +260,75 @@ describe('ReactDOMComponent', function() {\n       expect(container.firstChild.hasAttribute('height')).toBe(false);\n     });\n \n+    it('should remove known SVG camel case attributes', function() {\n+      var container = document.createElement('div');\n+      ReactDOM.render(<svg viewBox=\"0 0 100 100\" />, container);\n+\n+      expect(container.firstChild.hasAttribute('viewBox')).toBe(true);\n+      ReactDOM.render(<svg />, container);\n+      expect(container.firstChild.hasAttribute('viewBox')).toBe(false);\n+    });\n+\n+    it('should remove known SVG hyphenated attributes', function() {\n+      var container = document.createElement('div');\n+      ReactDOM.render(<svg clip-path=\"0 0 100 100\" />, container);\n+\n+      expect(container.firstChild.hasAttribute('clip-path')).toBe(true);\n+      ReactDOM.render(<svg />, container);\n+      expect(container.firstChild.hasAttribute('clip-path')).toBe(false);\n+    });\n+\n+    it('should remove arbitrary SVG hyphenated attributes', function() {\n+      var container = document.createElement('div');\n+      ReactDOM.render(<svg the-word=\"the-bird\" />, container);\n+\n+      expect(container.firstChild.hasAttribute('the-word')).toBe(true);\n+      ReactDOM.render(<svg />, container);\n+      expect(container.firstChild.hasAttribute('the-word')).toBe(false);\n+    });\n+\n+    it('should remove arbitrary SVG camel case attributes', function() {\n+      var container = document.createElement('div');\n+      ReactDOM.render(<svg theWord=\"theBird\" />, container);\n+\n+      expect(container.firstChild.hasAttribute('theWord')).toBe(true);\n+      ReactDOM.render(<svg />, container);\n+      expect(container.firstChild.hasAttribute('theWord')).toBe(false);\n+    });\n+\n+    it('should remove SVG attributes that should have been hyphenated', function() {\n+      spyOn(console, 'error');\n+      var container = document.createElement('div');\n+      ReactDOM.render(<svg clipPath=\"0 0 100 100\" />, container);\n+      expect(console.error.argsForCall.length).toBe(1);\n+      expect(console.error.argsForCall[0][0]).toContain('clipPath');\n+      expect(console.error.argsForCall[0][0]).toContain('clip-path');\n+\n+      expect(container.firstChild.hasAttribute('clip-path')).toBe(true);\n+      ReactDOM.render(<svg />, container);\n+      expect(container.firstChild.hasAttribute('clip-path')).toBe(false);\n+    });\n+\n+    it('should remove namespaced SVG attributes', function() {\n+      var container = document.createElement('div');\n+      ReactDOM.render(\n+        <svg>\n+          <image xlinkHref=\"http://i.imgur.com/w7GCRPb.png\" />","path":"src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js","position":57,"original_position":57,"commit_id":"013340a44dbf99e5855962e68688453eab324f5f","original_commit_id":"013340a44dbf99e5855962e68688453eab324f5f","user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"body":"fun story - at Mozilla we had tests randomly start breaking one day and it took us a while to figure out that it was because we had a test trying to load a remote image which no longer existed. I don't expect that to happen here but I wanted to call it out just in case I'm long gone and it does happen. Also, we already have a test with this exact svg image so meh.","created_at":"2015-12-23T20:14:02Z","updated_at":"2015-12-23T20:14:02Z","html_url":"https://github.com/facebook/react/pull/5714#discussion_r48376123","pull_request_url":"https://api.github.com/repos/facebook/react/pulls/5714","_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/comments/48376123"},"html":{"href":"https://github.com/facebook/react/pull/5714#discussion_r48376123"},"pull_request":{"href":"https://api.github.com/repos/facebook/react/pulls/5714"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/5714","id":54410704,"html_url":"https://github.com/facebook/react/pull/5714","diff_url":"https://github.com/facebook/react/pull/5714.diff","patch_url":"https://github.com/facebook/react/pull/5714.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/5714","number":5714,"state":"open","locked":false,"title":"Pass all SVG attributes through","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"body":"All attributes defined on SVG elements will now be passed directly regardless of the whitelist.\r\nThe casing specified by user will be preserved, and `setAttribute()` will be used.\r\n\r\nIn the future we will remove support for the camel case aliases to the hyphenated attributes. For example, we currently map `strokeWidth` to `stroke-width` but this is now deprecated behind a warning. When we remove support for this, we can remove some of the code paths introduced in this commit.\r\n\r\nThe purpose of this change is to stop maintaining a separate SVG property config.\r\nThe config still exists for two purposes:\r\n\r\n* Allow a migration path for deprecated camelcased versions of hyphenated SVG attributes\r\n* Track special namespaced attributes (they still require a whitelist)\r\n\r\nHowever it is no longer a blocker for using new non-namespaced SVG attributes, and users don't have to ask us to add them to the whitelist.\r\n\r\nFixes #1657","created_at":"2015-12-22T20:20:13Z","updated_at":"2015-12-23T20:14:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bbdee29f70758da1fc8ef43b9d4ff9e8eac7656","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/5714/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/5714/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/5714/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/013340a44dbf99e5855962e68688453eab324f5f","head":{"label":"gaearon:passthrough-svg-attributes","ref":"passthrough-svg-attributes","sha":"013340a44dbf99e5855962e68688453eab324f5f","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"repo":{"id":20167073,"name":"react","full_name":"gaearon/react","owner":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaearon/react","description":"React is a JavaScript library for building user interfaces. It's declarative, efficient, and extremely flexible. What's more, it works with the libraries and frameworks that you already know.","fork":true,"url":"https://api.github.com/repos/gaearon/react","forks_url":"https://api.github.com/repos/gaearon/react/forks","keys_url":"https://api.github.com/repos/gaearon/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaearon/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaearon/react/teams","hooks_url":"https://api.github.com/repos/gaearon/react/hooks","issue_events_url":"https://api.github.com/repos/gaearon/react/issues/events{/number}","events_url":"https://api.github.com/repos/gaearon/react/events","assignees_url":"https://api.github.com/repos/gaearon/react/assignees{/user}","branches_url":"https://api.github.com/repos/gaearon/react/branches{/branch}","tags_url":"https://api.github.com/repos/gaearon/react/tags","blobs_url":"https://api.github.com/repos/gaearon/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaearon/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaearon/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaearon/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaearon/react/statuses/{sha}","languages_url":"https://api.github.com/repos/gaearon/react/languages","stargazers_url":"https://api.github.com/repos/gaearon/react/stargazers","contributors_url":"https://api.github.com/repos/gaearon/react/contributors","subscribers_url":"https://api.github.com/repos/gaearon/react/subscribers","subscription_url":"https://api.github.com/repos/gaearon/react/subscription","commits_url":"https://api.github.com/repos/gaearon/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaearon/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaearon/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaearon/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaearon/react/contents/{+path}","compare_url":"https://api.github.com/repos/gaearon/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaearon/react/merges","archive_url":"https://api.github.com/repos/gaearon/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaearon/react/downloads","issues_url":"https://api.github.com/repos/gaearon/react/issues{/number}","pulls_url":"https://api.github.com/repos/gaearon/react/pulls{/number}","milestones_url":"https://api.github.com/repos/gaearon/react/milestones{/number}","notifications_url":"https://api.github.com/repos/gaearon/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaearon/react/labels{/name}","releases_url":"https://api.github.com/repos/gaearon/react/releases{/id}","created_at":"2014-05-25T21:59:02Z","updated_at":"2014-06-24T09:06:01Z","pushed_at":"2015-12-23T17:47:56Z","git_url":"git://github.com/gaearon/react.git","ssh_url":"git@github.com:gaearon/react.git","clone_url":"https://github.com/gaearon/react.git","svn_url":"https://github.com/gaearon/react","homepage":"http://facebook.github.io/react/","size":55270,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"4865ddf7ea4ef7e82eeb04ce1fb743dcba507e75","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","created_at":"2013-05-24T16:15:54Z","updated_at":"2015-12-23T20:12:12Z","pushed_at":"2015-12-23T19:53:13Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":90461,"stargazers_count":33496,"watchers_count":33496,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5367,"mirror_url":null,"open_issues_count":586,"forks":5367,"open_issues":586,"watchers":33496,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/5714"},"html":{"href":"https://github.com/facebook/react/pull/5714"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/5714"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/5714/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/5714/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/5714/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/013340a44dbf99e5855962e68688453eab324f5f"}}}}