{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/29375665","id":29375665,"diff_hunk":"@@ -713,7 +713,7 @@ $.widget( \"ui.tabs\", {\n \t_getIndex: function( index ) {\n \t\t// meta-function to give users option to provide a href string instead of a numerical index.\n \t\tif ( typeof index === \"string\" ) {\n-\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + index + \"']\" ) );\n+\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + $.ui.escapeId( index ) + \"']\" ) );","path":"ui/tabs.js","position":5,"original_position":5,"commit_id":"e65f90079233ca232036e1ffeadbc813ddac6f26","original_commit_id":"e65f90079233ca232036e1ffeadbc813ddac6f26","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"body":"Ah right sorry we use urls as a form of id in a similar case in mobile. Was thinking of that. Either way though yes this does work here to sanitize this for a selector. We use this in mobile as part of our navigation as we need to frequently sanitize things for use as a selector. \r\n\r\n","created_at":"2015-04-29T20:13:50Z","updated_at":"2015-04-29T20:13:50Z","html_url":"https://github.com/jquery/jquery-ui/pull/1546#discussion_r29375665","pull_request_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546","_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/29375665"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1546#discussion_r29375665"},"pull_request":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546","id":34141832,"html_url":"https://github.com/jquery/jquery-ui/pull/1546","diff_url":"https://github.com/jquery/jquery-ui/pull/1546.diff","patch_url":"https://github.com/jquery/jquery-ui/pull/1546.patch","issue_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546","number":1546,"state":"open","locked":false,"title":"Add methods for finding labels and forms for controls","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"body":"This adds 2 new `$.fn` methods to core, and a new prop to `$.ui.escapeId`.\r\n\r\n`$.fn.labels` which mimics the native `control.labels` ( and uses it where possible ). This method unlike the native property also works on detached DOM nodes, and in browsers not supporting `control.labels`. \r\n\r\n`$.fn.form` which fixes the native `control.form` in IE8 where setting the `form` attribute breaks the `form` property by changing it to a string. \r\n\r\n`$.ui.escapeId` is a regex for escaping `id` and similar to be able to use them as jQuery selectors. Its needed anytime you are building a selector from the id or some other attribute of an element because there are characters valid in the HTML that need to be escaped when used as a selector. \r\n\r\nThis also updates selectmenu to use both `$.fn.labels` and `$.ui.escapeId` and it updates tabs to use `$.ui.escapeId`. `$.fn.form` is needed both by checkboxradio in the button rewrite but also by the from reset extension @scottgonzalez is working on. Checkboxradio will also use `$.ui.escapeId`. jquery-mobile will also use all three of these.\r\n\r\nNote: This does add 3 new exceptions to `htmllint:bad` for the labels tests. These are needed to make sure we match that native implementation. While the markup may not be valid it is supported by every browser, so it is required otherwise we could get label / input mismatches which would break visual state and underlying state consistency for inputs and labels in things like checkboxradio. Specifically this can happen with inputs wrapped in multiple labels, and inputs which are wrapped in a label which is associated with an input besides the one it contains based on its `for` attribute.","created_at":"2015-04-27T06:09:07Z","updated_at":"2015-04-29T20:13:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c43d8ce4b54e0a3c807fc3da55f792899d865c64","assignee":null,"milestone":{"url":"https://api.github.com/repos/jquery/jquery-ui/milestones/1","html_url":"https://github.com/jquery/jquery-ui/milestones/1.12","labels_url":"https://api.github.com/repos/jquery/jquery-ui/milestones/1/labels","id":743651,"number":1,"title":"1.12","description":"","creator":{"login":"scottgonzalez","id":141167,"avatar_url":"https://avatars.githubusercontent.com/u/141167?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgonzalez","html_url":"https://github.com/scottgonzalez","followers_url":"https://api.github.com/users/scottgonzalez/followers","following_url":"https://api.github.com/users/scottgonzalez/following{/other_user}","gists_url":"https://api.github.com/users/scottgonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgonzalez/subscriptions","organizations_url":"https://api.github.com/users/scottgonzalez/orgs","repos_url":"https://api.github.com/users/scottgonzalez/repos","events_url":"https://api.github.com/users/scottgonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/scottgonzalez/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2014-08-05T14:44:19Z","updated_at":"2015-04-27T06:09:27Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1546/comments","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/e65f90079233ca232036e1ffeadbc813ddac6f26","head":{"label":"arschmitz:input-methods","ref":"input-methods","sha":"e65f90079233ca232036e1ffeadbc813ddac6f26","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"repo":{"id":4218107,"name":"jquery-ui","full_name":"arschmitz/jquery-ui","owner":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arschmitz/jquery-ui","description":"The official jQuery user interface library.","fork":true,"url":"https://api.github.com/repos/arschmitz/jquery-ui","forks_url":"https://api.github.com/repos/arschmitz/jquery-ui/forks","keys_url":"https://api.github.com/repos/arschmitz/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arschmitz/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arschmitz/jquery-ui/teams","hooks_url":"https://api.github.com/repos/arschmitz/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/arschmitz/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/arschmitz/jquery-ui/events","assignees_url":"https://api.github.com/repos/arschmitz/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/arschmitz/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/arschmitz/jquery-ui/tags","blobs_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arschmitz/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/arschmitz/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/arschmitz/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/arschmitz/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/arschmitz/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/arschmitz/jquery-ui/subscription","commits_url":"https://api.github.com/repos/arschmitz/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/arschmitz/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/arschmitz/jquery-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/arschmitz/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/arschmitz/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arschmitz/jquery-ui/merges","archive_url":"https://api.github.com/repos/arschmitz/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arschmitz/jquery-ui/downloads","issues_url":"https://api.github.com/repos/arschmitz/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/arschmitz/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/arschmitz/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/arschmitz/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arschmitz/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/arschmitz/jquery-ui/releases{/id}","created_at":"2012-05-03T19:57:50Z","updated_at":"2015-01-15T14:40:40Z","pushed_at":"2015-04-29T15:28:06Z","git_url":"git://github.com/arschmitz/jquery-ui.git","ssh_url":"git@github.com:arschmitz/jquery-ui.git","clone_url":"https://github.com/arschmitz/jquery-ui.git","svn_url":"https://github.com/arschmitz/jquery-ui","homepage":"http://jqueryui.com/","size":26262,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"8b89f8c59bacb1261639c909ee60fe3b856b36e4","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":478996,"name":"jquery-ui","full_name":"jquery/jquery-ui","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery-ui","description":"The official jQuery user interface library.","fork":false,"url":"https://api.github.com/repos/jquery/jquery-ui","forks_url":"https://api.github.com/repos/jquery/jquery-ui/forks","keys_url":"https://api.github.com/repos/jquery/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery-ui/teams","hooks_url":"https://api.github.com/repos/jquery/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery-ui/events","assignees_url":"https://api.github.com/repos/jquery/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery-ui/tags","blobs_url":"https://api.github.com/repos/jquery/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery-ui/subscription","commits_url":"https://api.github.com/repos/jquery/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery-ui/merges","archive_url":"https://api.github.com/repos/jquery/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery-ui/downloads","issues_url":"https://api.github.com/repos/jquery/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery-ui/releases{/id}","created_at":"2010-01-19T14:40:34Z","updated_at":"2015-04-29T17:17:08Z","pushed_at":"2015-04-29T15:29:08Z","git_url":"git://github.com/jquery/jquery-ui.git","ssh_url":"git@github.com:jquery/jquery-ui.git","clone_url":"https://github.com/jquery/jquery-ui.git","svn_url":"https://github.com/jquery/jquery-ui","homepage":"http://jqueryui.com/","size":48827,"stargazers_count":8865,"watchers_count":8865,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3469,"mirror_url":null,"open_issues_count":22,"forks":3469,"open_issues":22,"watchers":8865,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1546"},"issue":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1546"},"comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1546/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1546/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery-ui/statuses/e65f90079233ca232036e1ffeadbc813ddac6f26"}}}}