{"action":"opened","number":8866,"pull_request":{"url":"https://api.github.com/repos/linuxmint/cinnamon/pulls/8866","id":320065091,"node_id":"MDExOlB1bGxSZXF1ZXN0MzIwMDY1MDkx","html_url":"https://github.com/linuxmint/cinnamon/pull/8866","diff_url":"https://github.com/linuxmint/cinnamon/pull/8866.diff","patch_url":"https://github.com/linuxmint/cinnamon/pull/8866.patch","issue_url":"https://api.github.com/repos/linuxmint/cinnamon/issues/8866","number":8866,"state":"open","locked":false,"title":"Add RegExp escape utility function and use it in the menu","user":{"login":"itzexor","id":11601860,"node_id":"MDQ6VXNlcjExNjAxODYw","avatar_url":"https://avatars0.githubusercontent.com/u/11601860?v=4","gravatar_id":"","url":"https://api.github.com/users/itzexor","html_url":"https://github.com/itzexor","followers_url":"https://api.github.com/users/itzexor/followers","following_url":"https://api.github.com/users/itzexor/following{/other_user}","gists_url":"https://api.github.com/users/itzexor/gists{/gist_id}","starred_url":"https://api.github.com/users/itzexor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itzexor/subscriptions","organizations_url":"https://api.github.com/users/itzexor/orgs","repos_url":"https://api.github.com/users/itzexor/repos","events_url":"https://api.github.com/users/itzexor/events{/privacy}","received_events_url":"https://api.github.com/users/itzexor/received_events","type":"User","site_admin":false},"body":"This prevents js errors when you type reserved characters like \\ or [ and such into the search box.\r\n\r\n**Behavior change:**\r\nBesides avoiding js errors when an incomplete regex is typed by the user, this effectively disables regex searching via the menu search box. On master, the menu search is basically a regex-enabled search field where the query is prefixed with the regex `\\b` word boundary metacharacter. A user typing in\r\n`(applet|panel)` would have a perfectly valid regex search that matches both \"applet\" and \"panel\", but not mid-word. Many JS errors will be printed while typing that, but after `)` the search will work fine.\r\n\r\n**Options:**\r\n\r\n1. If we actually want a regex-enabled search then the error spamming can be avoided, but there needs to be a feedback mechanism in the UI itself to report invalid search strings.\r\n2. If we don't want regex-enabled search then this PR escapes the user input and uses it as a string literal.","created_at":"2019-09-22T17:19:46Z","updated_at":"2019-09-22T17:19:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linuxmint/cinnamon/pulls/8866/commits","review_comments_url":"https://api.github.com/repos/linuxmint/cinnamon/pulls/8866/comments","review_comment_url":"https://api.github.com/repos/linuxmint/cinnamon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linuxmint/cinnamon/issues/8866/comments","statuses_url":"https://api.github.com/repos/linuxmint/cinnamon/statuses/e2091182e49e8a237d30f77d8006831aba71f71a","head":{"label":"itzexor:regex-escape-1","ref":"regex-escape-1","sha":"e2091182e49e8a237d30f77d8006831aba71f71a","user":{"login":"itzexor","id":11601860,"node_id":"MDQ6VXNlcjExNjAxODYw","avatar_url":"https://avatars0.githubusercontent.com/u/11601860?v=4","gravatar_id":"","url":"https://api.github.com/users/itzexor","html_url":"https://github.com/itzexor","followers_url":"https://api.github.com/users/itzexor/followers","following_url":"https://api.github.com/users/itzexor/following{/other_user}","gists_url":"https://api.github.com/users/itzexor/gists{/gist_id}","starred_url":"https://api.github.com/users/itzexor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itzexor/subscriptions","organizations_url":"https://api.github.com/users/itzexor/orgs","repos_url":"https://api.github.com/users/itzexor/repos","events_url":"https://api.github.com/users/itzexor/events{/privacy}","received_events_url":"https://api.github.com/users/itzexor/received_events","type":"User","site_admin":false},"repo":{"id":50894474,"node_id":"MDEwOlJlcG9zaXRvcnk1MDg5NDQ3NA==","name":"Cinnamon","full_name":"itzexor/Cinnamon","private":false,"owner":{"login":"itzexor","id":11601860,"node_id":"MDQ6VXNlcjExNjAxODYw","avatar_url":"https://avatars0.githubusercontent.com/u/11601860?v=4","gravatar_id":"","url":"https://api.github.com/users/itzexor","html_url":"https://github.com/itzexor","followers_url":"https://api.github.com/users/itzexor/followers","following_url":"https://api.github.com/users/itzexor/following{/other_user}","gists_url":"https://api.github.com/users/itzexor/gists{/gist_id}","starred_url":"https://api.github.com/users/itzexor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itzexor/subscriptions","organizations_url":"https://api.github.com/users/itzexor/orgs","repos_url":"https://api.github.com/users/itzexor/repos","events_url":"https://api.github.com/users/itzexor/events{/privacy}","received_events_url":"https://api.github.com/users/itzexor/received_events","type":"User","site_admin":false},"html_url":"https://github.com/itzexor/Cinnamon","description":"A Linux Desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features. ","fork":true,"url":"https://api.github.com/repos/itzexor/Cinnamon","forks_url":"https://api.github.com/repos/itzexor/Cinnamon/forks","keys_url":"https://api.github.com/repos/itzexor/Cinnamon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itzexor/Cinnamon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itzexor/Cinnamon/teams","hooks_url":"https://api.github.com/repos/itzexor/Cinnamon/hooks","issue_events_url":"https://api.github.com/repos/itzexor/Cinnamon/issues/events{/number}","events_url":"https://api.github.com/repos/itzexor/Cinnamon/events","assignees_url":"https://api.github.com/repos/itzexor/Cinnamon/assignees{/user}","branches_url":"https://api.github.com/repos/itzexor/Cinnamon/branches{/branch}","tags_url":"https://api.github.com/repos/itzexor/Cinnamon/tags","blobs_url":"https://api.github.com/repos/itzexor/Cinnamon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itzexor/Cinnamon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itzexor/Cinnamon/git/refs{/sha}","trees_url":"https://api.github.com/repos/itzexor/Cinnamon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itzexor/Cinnamon/statuses/{sha}","languages_url":"https://api.github.com/repos/itzexor/Cinnamon/languages","stargazers_url":"https://api.github.com/repos/itzexor/Cinnamon/stargazers","contributors_url":"https://api.github.com/repos/itzexor/Cinnamon/contributors","subscribers_url":"https://api.github.com/repos/itzexor/Cinnamon/subscribers","subscription_url":"https://api.github.com/repos/itzexor/Cinnamon/subscription","commits_url":"https://api.github.com/repos/itzexor/Cinnamon/commits{/sha}","git_commits_url":"https://api.github.com/repos/itzexor/Cinnamon/git/commits{/sha}","comments_url":"https://api.github.com/repos/itzexor/Cinnamon/comments{/number}","issue_comment_url":"https://api.github.com/repos/itzexor/Cinnamon/issues/comments{/number}","contents_url":"https://api.github.com/repos/itzexor/Cinnamon/contents/{+path}","compare_url":"https://api.github.com/repos/itzexor/Cinnamon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itzexor/Cinnamon/merges","archive_url":"https://api.github.com/repos/itzexor/Cinnamon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itzexor/Cinnamon/downloads","issues_url":"https://api.github.com/repos/itzexor/Cinnamon/issues{/number}","pulls_url":"https://api.github.com/repos/itzexor/Cinnamon/pulls{/number}","milestones_url":"https://api.github.com/repos/itzexor/Cinnamon/milestones{/number}","notifications_url":"https://api.github.com/repos/itzexor/Cinnamon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itzexor/Cinnamon/labels{/name}","releases_url":"https://api.github.com/repos/itzexor/Cinnamon/releases{/id}","deployments_url":"https://api.github.com/repos/itzexor/Cinnamon/deployments","created_at":"2016-02-02T04:37:25Z","updated_at":"2019-01-19T01:12:44Z","pushed_at":"2019-09-22T17:03:58Z","git_url":"git://github.com/itzexor/Cinnamon.git","ssh_url":"git@github.com:itzexor/Cinnamon.git","clone_url":"https://github.com/itzexor/Cinnamon.git","svn_url":"https://github.com/itzexor/Cinnamon","homepage":"http://cinnamon.linuxmint.com","size":28768,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"linuxmint:master","ref":"master","sha":"073c60029128bffd44b3e932e2237b0727055385","user":{"login":"linuxmint","id":107184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzE4NA==","avatar_url":"https://avatars1.githubusercontent.com/u/107184?v=4","gravatar_id":"","url":"https://api.github.com/users/linuxmint","html_url":"https://github.com/linuxmint","followers_url":"https://api.github.com/users/linuxmint/followers","following_url":"https://api.github.com/users/linuxmint/following{/other_user}","gists_url":"https://api.github.com/users/linuxmint/gists{/gist_id}","starred_url":"https://api.github.com/users/linuxmint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linuxmint/subscriptions","organizations_url":"https://api.github.com/users/linuxmint/orgs","repos_url":"https://api.github.com/users/linuxmint/repos","events_url":"https://api.github.com/users/linuxmint/events{/privacy}","received_events_url":"https://api.github.com/users/linuxmint/received_events","type":"Organization","site_admin":false},"repo":{"id":3019537,"node_id":"MDEwOlJlcG9zaXRvcnkzMDE5NTM3","name":"cinnamon","full_name":"linuxmint/cinnamon","private":false,"owner":{"login":"linuxmint","id":107184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzE4NA==","avatar_url":"https://avatars1.githubusercontent.com/u/107184?v=4","gravatar_id":"","url":"https://api.github.com/users/linuxmint","html_url":"https://github.com/linuxmint","followers_url":"https://api.github.com/users/linuxmint/followers","following_url":"https://api.github.com/users/linuxmint/following{/other_user}","gists_url":"https://api.github.com/users/linuxmint/gists{/gist_id}","starred_url":"https://api.github.com/users/linuxmint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linuxmint/subscriptions","organizations_url":"https://api.github.com/users/linuxmint/orgs","repos_url":"https://api.github.com/users/linuxmint/repos","events_url":"https://api.github.com/users/linuxmint/events{/privacy}","received_events_url":"https://api.github.com/users/linuxmint/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/linuxmint/cinnamon","description":"A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features. ","fork":false,"url":"https://api.github.com/repos/linuxmint/cinnamon","forks_url":"https://api.github.com/repos/linuxmint/cinnamon/forks","keys_url":"https://api.github.com/repos/linuxmint/cinnamon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linuxmint/cinnamon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linuxmint/cinnamon/teams","hooks_url":"https://api.github.com/repos/linuxmint/cinnamon/hooks","issue_events_url":"https://api.github.com/repos/linuxmint/cinnamon/issues/events{/number}","events_url":"https://api.github.com/repos/linuxmint/cinnamon/events","assignees_url":"https://api.github.com/repos/linuxmint/cinnamon/assignees{/user}","branches_url":"https://api.github.com/repos/linuxmint/cinnamon/branches{/branch}","tags_url":"https://api.github.com/repos/linuxmint/cinnamon/tags","blobs_url":"https://api.github.com/repos/linuxmint/cinnamon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linuxmint/cinnamon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linuxmint/cinnamon/git/refs{/sha}","trees_url":"https://api.github.com/repos/linuxmint/cinnamon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linuxmint/cinnamon/statuses/{sha}","languages_url":"https://api.github.com/repos/linuxmint/cinnamon/languages","stargazers_url":"https://api.github.com/repos/linuxmint/cinnamon/stargazers","contributors_url":"https://api.github.com/repos/linuxmint/cinnamon/contributors","subscribers_url":"https://api.github.com/repos/linuxmint/cinnamon/subscribers","subscription_url":"https://api.github.com/repos/linuxmint/cinnamon/subscription","commits_url":"https://api.github.com/repos/linuxmint/cinnamon/commits{/sha}","git_commits_url":"https://api.github.com/repos/linuxmint/cinnamon/git/commits{/sha}","comments_url":"https://api.github.com/repos/linuxmint/cinnamon/comments{/number}","issue_comment_url":"https://api.github.com/repos/linuxmint/cinnamon/issues/comments{/number}","contents_url":"https://api.github.com/repos/linuxmint/cinnamon/contents/{+path}","compare_url":"https://api.github.com/repos/linuxmint/cinnamon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linuxmint/cinnamon/merges","archive_url":"https://api.github.com/repos/linuxmint/cinnamon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linuxmint/cinnamon/downloads","issues_url":"https://api.github.com/repos/linuxmint/cinnamon/issues{/number}","pulls_url":"https://api.github.com/repos/linuxmint/cinnamon/pulls{/number}","milestones_url":"https://api.github.com/repos/linuxmint/cinnamon/milestones{/number}","notifications_url":"https://api.github.com/repos/linuxmint/cinnamon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linuxmint/cinnamon/labels{/name}","releases_url":"https://api.github.com/repos/linuxmint/cinnamon/releases{/id}","deployments_url":"https://api.github.com/repos/linuxmint/cinnamon/deployments","created_at":"2011-12-20T13:15:22Z","updated_at":"2019-09-22T17:11:10Z","pushed_at":"2019-09-22T16:14:05Z","git_url":"git://github.com/linuxmint/cinnamon.git","ssh_url":"git@github.com:linuxmint/cinnamon.git","clone_url":"https://github.com/linuxmint/cinnamon.git","svn_url":"https://github.com/linuxmint/cinnamon","homepage":"","size":28708,"stargazers_count":2883,"watchers_count":2883,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":545,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":971,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":545,"open_issues":971,"watchers":2883,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linuxmint/cinnamon/pulls/8866"},"html":{"href":"https://github.com/linuxmint/cinnamon/pull/8866"},"issue":{"href":"https://api.github.com/repos/linuxmint/cinnamon/issues/8866"},"comments":{"href":"https://api.github.com/repos/linuxmint/cinnamon/issues/8866/comments"},"review_comments":{"href":"https://api.github.com/repos/linuxmint/cinnamon/pulls/8866/comments"},"review_comment":{"href":"https://api.github.com/repos/linuxmint/cinnamon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linuxmint/cinnamon/pulls/8866/commits"},"statuses":{"href":"https://api.github.com/repos/linuxmint/cinnamon/statuses/e2091182e49e8a237d30f77d8006831aba71f71a"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":15,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"itzexor"}}