{"action":"created","comment":{"url":"https://api.github.com/repos/frappe/frappe/pulls/comments/191646858","pull_request_review_id":124254862,"id":191646858,"diff_hunk":"@@ -16,7 +16,7 @@ <h5 class=\"item-search-results\" style=\"margin-right: 30px;\"></h5>\n frappe.ready(function() {\n \tif(frappe.utils.get_url_arg(\"search\")) {\n \t\tvar txt = frappe.utils.get_url_arg(\"search\");\n-\t\t$(\".item-search-results\").html(\"{{ _('Search results for') }}: \" + encodeURIComponent(txt));","path":"frappe/templates/includes/search_box.html","position":4,"original_position":4,"commit_id":"83e4ea331d8a8684c86cb9423ba75b9cf230edf6","original_commit_id":"83e4ea331d8a8684c86cb9423ba75b9cf230edf6","user":{"login":"rmehta","id":140076,"avatar_url":"https://avatars1.githubusercontent.com/u/140076?v=4","gravatar_id":"","url":"https://api.github.com/users/rmehta","html_url":"https://github.com/rmehta","followers_url":"https://api.github.com/users/rmehta/followers","following_url":"https://api.github.com/users/rmehta/following{/other_user}","gists_url":"https://api.github.com/users/rmehta/gists{/gist_id}","starred_url":"https://api.github.com/users/rmehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmehta/subscriptions","organizations_url":"https://api.github.com/users/rmehta/orgs","repos_url":"https://api.github.com/users/rmehta/repos","events_url":"https://api.github.com/users/rmehta/events{/privacy}","received_events_url":"https://api.github.com/users/rmehta/received_events","type":"User","site_admin":false},"body":"this will lead to JS injections. we need to strip all `<>` if possible\r\n\r\ntry\r\n\r\n```\r\n$(\".item-search-results\").html(\"{{ _('Search results for') + ': ' + html2txt(frappe.form_dict.search) }}\"); \r\n```\r\n\r\ntest if this works!","created_at":"2018-05-30T05:37:58Z","updated_at":"2018-05-30T05:39:52Z","html_url":"https://github.com/frappe/frappe/pull/5626#discussion_r191646858","pull_request_url":"https://api.github.com/repos/frappe/frappe/pulls/5626","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/frappe/frappe/pulls/comments/191646858"},"html":{"href":"https://github.com/frappe/frappe/pull/5626#discussion_r191646858"},"pull_request":{"href":"https://api.github.com/repos/frappe/frappe/pulls/5626"}}},"pull_request":{"url":"https://api.github.com/repos/frappe/frappe/pulls/5626","id":191086623,"html_url":"https://github.com/frappe/frappe/pull/5626","diff_url":"https://github.com/frappe/frappe/pull/5626.diff","patch_url":"https://github.com/frappe/frappe/pull/5626.patch","issue_url":"https://api.github.com/repos/frappe/frappe/issues/5626","number":5626,"state":"open","locked":false,"title":"[UX Improvement] Removed uri encoding from search results on front end","user":{"login":"sushantnadkar","id":8912289,"avatar_url":"https://avatars3.githubusercontent.com/u/8912289?v=4","gravatar_id":"","url":"https://api.github.com/users/sushantnadkar","html_url":"https://github.com/sushantnadkar","followers_url":"https://api.github.com/users/sushantnadkar/followers","following_url":"https://api.github.com/users/sushantnadkar/following{/other_user}","gists_url":"https://api.github.com/users/sushantnadkar/gists{/gist_id}","starred_url":"https://api.github.com/users/sushantnadkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sushantnadkar/subscriptions","organizations_url":"https://api.github.com/users/sushantnadkar/orgs","repos_url":"https://api.github.com/users/sushantnadkar/repos","events_url":"https://api.github.com/users/sushantnadkar/events{/privacy}","received_events_url":"https://api.github.com/users/sushantnadkar/received_events","type":"User","site_admin":false},"body":"Issue: The search strings on the website were encoded and displayed, for example, maple \"leaf\", displayed as maple%20%22leaf%22\r\n![image](https://user-images.githubusercontent.com/8912289/40650602-4f786214-6351-11e8-95f8-767ccc22cf6e.png)\r\n\r\nSolution: Remove uri encoding form search string.\r\n![image](https://user-images.githubusercontent.com/8912289/40650688-81414a90-6351-11e8-80dc-74b28effbd30.png)\r\n\r\nRelated to: [https://github.com/frappe/erpnext/pull/14266](https://github.com/frappe/erpnext/pull/14266)\r\n","created_at":"2018-05-29T09:37:48Z","updated_at":"2018-05-30T05:39:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99810720f6b4a576d657e320e49491e4d3060b62","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/frappe/frappe/pulls/5626/commits","review_comments_url":"https://api.github.com/repos/frappe/frappe/pulls/5626/comments","review_comment_url":"https://api.github.com/repos/frappe/frappe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frappe/frappe/issues/5626/comments","statuses_url":"https://api.github.com/repos/frappe/frappe/statuses/83e4ea331d8a8684c86cb9423ba75b9cf230edf6","head":{"label":"sushantnadkar:remove-uri-encoding-from-search-results","ref":"remove-uri-encoding-from-search-results","sha":"83e4ea331d8a8684c86cb9423ba75b9cf230edf6","user":{"login":"sushantnadkar","id":8912289,"avatar_url":"https://avatars3.githubusercontent.com/u/8912289?v=4","gravatar_id":"","url":"https://api.github.com/users/sushantnadkar","html_url":"https://github.com/sushantnadkar","followers_url":"https://api.github.com/users/sushantnadkar/followers","following_url":"https://api.github.com/users/sushantnadkar/following{/other_user}","gists_url":"https://api.github.com/users/sushantnadkar/gists{/gist_id}","starred_url":"https://api.github.com/users/sushantnadkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sushantnadkar/subscriptions","organizations_url":"https://api.github.com/users/sushantnadkar/orgs","repos_url":"https://api.github.com/users/sushantnadkar/repos","events_url":"https://api.github.com/users/sushantnadkar/events{/privacy}","received_events_url":"https://api.github.com/users/sushantnadkar/received_events","type":"User","site_admin":false},"repo":{"id":95683455,"name":"frappe","full_name":"sushantnadkar/frappe","owner":{"login":"sushantnadkar","id":8912289,"avatar_url":"https://avatars3.githubusercontent.com/u/8912289?v=4","gravatar_id":"","url":"https://api.github.com/users/sushantnadkar","html_url":"https://github.com/sushantnadkar","followers_url":"https://api.github.com/users/sushantnadkar/followers","following_url":"https://api.github.com/users/sushantnadkar/following{/other_user}","gists_url":"https://api.github.com/users/sushantnadkar/gists{/gist_id}","starred_url":"https://api.github.com/users/sushantnadkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sushantnadkar/subscriptions","organizations_url":"https://api.github.com/users/sushantnadkar/orgs","repos_url":"https://api.github.com/users/sushantnadkar/repos","events_url":"https://api.github.com/users/sushantnadkar/events{/privacy}","received_events_url":"https://api.github.com/users/sushantnadkar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sushantnadkar/frappe","description":"Rapid Application Development Framework in Python & JS. Used to build ERPNext","fork":true,"url":"https://api.github.com/repos/sushantnadkar/frappe","forks_url":"https://api.github.com/repos/sushantnadkar/frappe/forks","keys_url":"https://api.github.com/repos/sushantnadkar/frappe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sushantnadkar/frappe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sushantnadkar/frappe/teams","hooks_url":"https://api.github.com/repos/sushantnadkar/frappe/hooks","issue_events_url":"https://api.github.com/repos/sushantnadkar/frappe/issues/events{/number}","events_url":"https://api.github.com/repos/sushantnadkar/frappe/events","assignees_url":"https://api.github.com/repos/sushantnadkar/frappe/assignees{/user}","branches_url":"https://api.github.com/repos/sushantnadkar/frappe/branches{/branch}","tags_url":"https://api.github.com/repos/sushantnadkar/frappe/tags","blobs_url":"https://api.github.com/repos/sushantnadkar/frappe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sushantnadkar/frappe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sushantnadkar/frappe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sushantnadkar/frappe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sushantnadkar/frappe/statuses/{sha}","languages_url":"https://api.github.com/repos/sushantnadkar/frappe/languages","stargazers_url":"https://api.github.com/repos/sushantnadkar/frappe/stargazers","contributors_url":"https://api.github.com/repos/sushantnadkar/frappe/contributors","subscribers_url":"https://api.github.com/repos/sushantnadkar/frappe/subscribers","subscription_url":"https://api.github.com/repos/sushantnadkar/frappe/subscription","commits_url":"https://api.github.com/repos/sushantnadkar/frappe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sushantnadkar/frappe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sushantnadkar/frappe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sushantnadkar/frappe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sushantnadkar/frappe/contents/{+path}","compare_url":"https://api.github.com/repos/sushantnadkar/frappe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sushantnadkar/frappe/merges","archive_url":"https://api.github.com/repos/sushantnadkar/frappe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sushantnadkar/frappe/downloads","issues_url":"https://api.github.com/repos/sushantnadkar/frappe/issues{/number}","pulls_url":"https://api.github.com/repos/sushantnadkar/frappe/pulls{/number}","milestones_url":"https://api.github.com/repos/sushantnadkar/frappe/milestones{/number}","notifications_url":"https://api.github.com/repos/sushantnadkar/frappe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sushantnadkar/frappe/labels{/name}","releases_url":"https://api.github.com/repos/sushantnadkar/frappe/releases{/id}","deployments_url":"https://api.github.com/repos/sushantnadkar/frappe/deployments","created_at":"2017-06-28T15:19:34Z","updated_at":"2017-06-28T15:19:41Z","pushed_at":"2018-05-29T09:14:44Z","git_url":"git://github.com/sushantnadkar/frappe.git","ssh_url":"git@github.com:sushantnadkar/frappe.git","clone_url":"https://github.com/sushantnadkar/frappe.git","svn_url":"https://github.com/sushantnadkar/frappe","homepage":"http://frappe.io","size":165066,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"frappe:develop","ref":"develop","sha":"b4f6cdf71eb6968738e53c2b4bf6498f5e174b81","user":{"login":"frappe","id":836974,"avatar_url":"https://avatars2.githubusercontent.com/u/836974?v=4","gravatar_id":"","url":"https://api.github.com/users/frappe","html_url":"https://github.com/frappe","followers_url":"https://api.github.com/users/frappe/followers","following_url":"https://api.github.com/users/frappe/following{/other_user}","gists_url":"https://api.github.com/users/frappe/gists{/gist_id}","starred_url":"https://api.github.com/users/frappe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frappe/subscriptions","organizations_url":"https://api.github.com/users/frappe/orgs","repos_url":"https://api.github.com/users/frappe/repos","events_url":"https://api.github.com/users/frappe/events{/privacy}","received_events_url":"https://api.github.com/users/frappe/received_events","type":"Organization","site_admin":false},"repo":{"id":1864194,"name":"frappe","full_name":"frappe/frappe","owner":{"login":"frappe","id":836974,"avatar_url":"https://avatars2.githubusercontent.com/u/836974?v=4","gravatar_id":"","url":"https://api.github.com/users/frappe","html_url":"https://github.com/frappe","followers_url":"https://api.github.com/users/frappe/followers","following_url":"https://api.github.com/users/frappe/following{/other_user}","gists_url":"https://api.github.com/users/frappe/gists{/gist_id}","starred_url":"https://api.github.com/users/frappe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frappe/subscriptions","organizations_url":"https://api.github.com/users/frappe/orgs","repos_url":"https://api.github.com/users/frappe/repos","events_url":"https://api.github.com/users/frappe/events{/privacy}","received_events_url":"https://api.github.com/users/frappe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/frappe/frappe","description":"Full Stack Web Framework in Python & JS. Used to build ERPNext","fork":false,"url":"https://api.github.com/repos/frappe/frappe","forks_url":"https://api.github.com/repos/frappe/frappe/forks","keys_url":"https://api.github.com/repos/frappe/frappe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frappe/frappe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frappe/frappe/teams","hooks_url":"https://api.github.com/repos/frappe/frappe/hooks","issue_events_url":"https://api.github.com/repos/frappe/frappe/issues/events{/number}","events_url":"https://api.github.com/repos/frappe/frappe/events","assignees_url":"https://api.github.com/repos/frappe/frappe/assignees{/user}","branches_url":"https://api.github.com/repos/frappe/frappe/branches{/branch}","tags_url":"https://api.github.com/repos/frappe/frappe/tags","blobs_url":"https://api.github.com/repos/frappe/frappe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frappe/frappe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frappe/frappe/git/refs{/sha}","trees_url":"https://api.github.com/repos/frappe/frappe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frappe/frappe/statuses/{sha}","languages_url":"https://api.github.com/repos/frappe/frappe/languages","stargazers_url":"https://api.github.com/repos/frappe/frappe/stargazers","contributors_url":"https://api.github.com/repos/frappe/frappe/contributors","subscribers_url":"https://api.github.com/repos/frappe/frappe/subscribers","subscription_url":"https://api.github.com/repos/frappe/frappe/subscription","commits_url":"https://api.github.com/repos/frappe/frappe/commits{/sha}","git_commits_url":"https://api.github.com/repos/frappe/frappe/git/commits{/sha}","comments_url":"https://api.github.com/repos/frappe/frappe/comments{/number}","issue_comment_url":"https://api.github.com/repos/frappe/frappe/issues/comments{/number}","contents_url":"https://api.github.com/repos/frappe/frappe/contents/{+path}","compare_url":"https://api.github.com/repos/frappe/frappe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frappe/frappe/merges","archive_url":"https://api.github.com/repos/frappe/frappe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frappe/frappe/downloads","issues_url":"https://api.github.com/repos/frappe/frappe/issues{/number}","pulls_url":"https://api.github.com/repos/frappe/frappe/pulls{/number}","milestones_url":"https://api.github.com/repos/frappe/frappe/milestones{/number}","notifications_url":"https://api.github.com/repos/frappe/frappe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frappe/frappe/labels{/name}","releases_url":"https://api.github.com/repos/frappe/frappe/releases{/id}","deployments_url":"https://api.github.com/repos/frappe/frappe/deployments","created_at":"2011-06-08T08:14:16Z","updated_at":"2018-05-29T13:45:01Z","pushed_at":"2018-05-29T17:41:59Z","git_url":"git://github.com/frappe/frappe.git","ssh_url":"git@github.com:frappe/frappe.git","clone_url":"https://github.com/frappe/frappe.git","svn_url":"https://github.com/frappe/frappe","homepage":"http://frappe.io","size":161565,"stargazers_count":906,"watchers_count":906,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":720,"mirror_url":null,"archived":false,"open_issues_count":270,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":720,"open_issues":270,"watchers":906,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/frappe/frappe/pulls/5626"},"html":{"href":"https://github.com/frappe/frappe/pull/5626"},"issue":{"href":"https://api.github.com/repos/frappe/frappe/issues/5626"},"comments":{"href":"https://api.github.com/repos/frappe/frappe/issues/5626/comments"},"review_comments":{"href":"https://api.github.com/repos/frappe/frappe/pulls/5626/comments"},"review_comment":{"href":"https://api.github.com/repos/frappe/frappe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frappe/frappe/pulls/5626/commits"},"statuses":{"href":"https://api.github.com/repos/frappe/frappe/statuses/83e4ea331d8a8684c86cb9423ba75b9cf230edf6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rmehta"}}