{"action":"opened","number":38,"pull_request":{"url":"https://api.github.com/repos/unbxd/js-sdk/pulls/38","id":95472734,"html_url":"https://github.com/unbxd/js-sdk/pull/38","diff_url":"https://github.com/unbxd/js-sdk/pull/38.diff","patch_url":"https://github.com/unbxd/js-sdk/pull/38.patch","issue_url":"https://api.github.com/repos/unbxd/js-sdk/issues/38","number":38,"state":"open","locked":false,"title":"Fixed issue that comes if a facet value ends with a double quote","user":{"login":"anuj610","id":5320080,"avatar_url":"https://avatars.githubusercontent.com/u/5320080?v=3","gravatar_id":"","url":"https://api.github.com/users/anuj610","html_url":"https://github.com/anuj610","followers_url":"https://api.github.com/users/anuj610/followers","following_url":"https://api.github.com/users/anuj610/following{/other_user}","gists_url":"https://api.github.com/users/anuj610/gists{/gist_id}","starred_url":"https://api.github.com/users/anuj610/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuj610/subscriptions","organizations_url":"https://api.github.com/users/anuj610/orgs","repos_url":"https://api.github.com/users/anuj610/repos","events_url":"https://api.github.com/users/anuj610/events{/privacy}","received_events_url":"https://api.github.com/users/anuj610/received_events","type":"User","site_admin":false},"body":"@santosh1994 @rahulcs Please review.\r\n\r\n**Problem :** If a facet value ends with a double quote and you apply the facet and reload the newly formed url, the library removes the ending quote and creates a malformed search api request.\r\n\r\n**Explanation :** \r\nIf I have a facet value **25.0\"**, its filtered url component becomes **Height_fq:\"25.0%5C\"\"** (%5C to escape the ending quote). The library then runs this code over it :\r\n**arr[1].replace(/\\\"{2,}/g, '\"').replace(/(^\")|(\"$)/g, '')**\r\n\r\nThis creates the following string : **\"25.0\\\"**\r\nThe above does not have a trailing double quote and the value now ends with a backslash.\r\n\r\n**Solution :**\r\nChanging the order of the replace functions corrects this behaviour.\r\n","created_at":"2016-11-28T10:31:01Z","updated_at":"2016-11-28T10:31:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/unbxd/js-sdk/pulls/38/commits","review_comments_url":"https://api.github.com/repos/unbxd/js-sdk/pulls/38/comments","review_comment_url":"https://api.github.com/repos/unbxd/js-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unbxd/js-sdk/issues/38/comments","statuses_url":"https://api.github.com/repos/unbxd/js-sdk/statuses/7f119ab5cf8b3d5f621179dd4608a332c9405eec","head":{"label":"anuj610:doublequote-issue","ref":"doublequote-issue","sha":"7f119ab5cf8b3d5f621179dd4608a332c9405eec","user":{"login":"anuj610","id":5320080,"avatar_url":"https://avatars.githubusercontent.com/u/5320080?v=3","gravatar_id":"","url":"https://api.github.com/users/anuj610","html_url":"https://github.com/anuj610","followers_url":"https://api.github.com/users/anuj610/followers","following_url":"https://api.github.com/users/anuj610/following{/other_user}","gists_url":"https://api.github.com/users/anuj610/gists{/gist_id}","starred_url":"https://api.github.com/users/anuj610/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuj610/subscriptions","organizations_url":"https://api.github.com/users/anuj610/orgs","repos_url":"https://api.github.com/users/anuj610/repos","events_url":"https://api.github.com/users/anuj610/events{/privacy}","received_events_url":"https://api.github.com/users/anuj610/received_events","type":"User","site_admin":false},"repo":{"id":52584445,"name":"js-sdk","full_name":"anuj610/js-sdk","owner":{"login":"anuj610","id":5320080,"avatar_url":"https://avatars.githubusercontent.com/u/5320080?v=3","gravatar_id":"","url":"https://api.github.com/users/anuj610","html_url":"https://github.com/anuj610","followers_url":"https://api.github.com/users/anuj610/followers","following_url":"https://api.github.com/users/anuj610/following{/other_user}","gists_url":"https://api.github.com/users/anuj610/gists{/gist_id}","starred_url":"https://api.github.com/users/anuj610/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuj610/subscriptions","organizations_url":"https://api.github.com/users/anuj610/orgs","repos_url":"https://api.github.com/users/anuj610/repos","events_url":"https://api.github.com/users/anuj610/events{/privacy}","received_events_url":"https://api.github.com/users/anuj610/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anuj610/js-sdk","description":"Javascript SDK to call Unbxd APIs","fork":true,"url":"https://api.github.com/repos/anuj610/js-sdk","forks_url":"https://api.github.com/repos/anuj610/js-sdk/forks","keys_url":"https://api.github.com/repos/anuj610/js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anuj610/js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anuj610/js-sdk/teams","hooks_url":"https://api.github.com/repos/anuj610/js-sdk/hooks","issue_events_url":"https://api.github.com/repos/anuj610/js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/anuj610/js-sdk/events","assignees_url":"https://api.github.com/repos/anuj610/js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/anuj610/js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/anuj610/js-sdk/tags","blobs_url":"https://api.github.com/repos/anuj610/js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anuj610/js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anuj610/js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/anuj610/js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anuj610/js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/anuj610/js-sdk/languages","stargazers_url":"https://api.github.com/repos/anuj610/js-sdk/stargazers","contributors_url":"https://api.github.com/repos/anuj610/js-sdk/contributors","subscribers_url":"https://api.github.com/repos/anuj610/js-sdk/subscribers","subscription_url":"https://api.github.com/repos/anuj610/js-sdk/subscription","commits_url":"https://api.github.com/repos/anuj610/js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/anuj610/js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/anuj610/js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/anuj610/js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/anuj610/js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/anuj610/js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anuj610/js-sdk/merges","archive_url":"https://api.github.com/repos/anuj610/js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anuj610/js-sdk/downloads","issues_url":"https://api.github.com/repos/anuj610/js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/anuj610/js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/anuj610/js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/anuj610/js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anuj610/js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/anuj610/js-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/anuj610/js-sdk/deployments","created_at":"2016-02-26T06:44:34Z","updated_at":"2016-02-26T06:44:35Z","pushed_at":"2016-11-28T10:20:15Z","git_url":"git://github.com/anuj610/js-sdk.git","ssh_url":"git@github.com:anuj610/js-sdk.git","clone_url":"https://github.com/anuj610/js-sdk.git","svn_url":"https://github.com/anuj610/js-sdk","homepage":null,"size":536,"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":"unbxd:master","ref":"master","sha":"e1431f579a69c37bc2a1ba7e22e049c93a1246a3","user":{"login":"unbxd","id":2639993,"avatar_url":"https://avatars.githubusercontent.com/u/2639993?v=3","gravatar_id":"","url":"https://api.github.com/users/unbxd","html_url":"https://github.com/unbxd","followers_url":"https://api.github.com/users/unbxd/followers","following_url":"https://api.github.com/users/unbxd/following{/other_user}","gists_url":"https://api.github.com/users/unbxd/gists{/gist_id}","starred_url":"https://api.github.com/users/unbxd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unbxd/subscriptions","organizations_url":"https://api.github.com/users/unbxd/orgs","repos_url":"https://api.github.com/users/unbxd/repos","events_url":"https://api.github.com/users/unbxd/events{/privacy}","received_events_url":"https://api.github.com/users/unbxd/received_events","type":"Organization","site_admin":false},"repo":{"id":18238781,"name":"js-sdk","full_name":"unbxd/js-sdk","owner":{"login":"unbxd","id":2639993,"avatar_url":"https://avatars.githubusercontent.com/u/2639993?v=3","gravatar_id":"","url":"https://api.github.com/users/unbxd","html_url":"https://github.com/unbxd","followers_url":"https://api.github.com/users/unbxd/followers","following_url":"https://api.github.com/users/unbxd/following{/other_user}","gists_url":"https://api.github.com/users/unbxd/gists{/gist_id}","starred_url":"https://api.github.com/users/unbxd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unbxd/subscriptions","organizations_url":"https://api.github.com/users/unbxd/orgs","repos_url":"https://api.github.com/users/unbxd/repos","events_url":"https://api.github.com/users/unbxd/events{/privacy}","received_events_url":"https://api.github.com/users/unbxd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unbxd/js-sdk","description":"Javascript SDK to call Unbxd APIs","fork":false,"url":"https://api.github.com/repos/unbxd/js-sdk","forks_url":"https://api.github.com/repos/unbxd/js-sdk/forks","keys_url":"https://api.github.com/repos/unbxd/js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unbxd/js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unbxd/js-sdk/teams","hooks_url":"https://api.github.com/repos/unbxd/js-sdk/hooks","issue_events_url":"https://api.github.com/repos/unbxd/js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/unbxd/js-sdk/events","assignees_url":"https://api.github.com/repos/unbxd/js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/unbxd/js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/unbxd/js-sdk/tags","blobs_url":"https://api.github.com/repos/unbxd/js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unbxd/js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unbxd/js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/unbxd/js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unbxd/js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/unbxd/js-sdk/languages","stargazers_url":"https://api.github.com/repos/unbxd/js-sdk/stargazers","contributors_url":"https://api.github.com/repos/unbxd/js-sdk/contributors","subscribers_url":"https://api.github.com/repos/unbxd/js-sdk/subscribers","subscription_url":"https://api.github.com/repos/unbxd/js-sdk/subscription","commits_url":"https://api.github.com/repos/unbxd/js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/unbxd/js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/unbxd/js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/unbxd/js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/unbxd/js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/unbxd/js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unbxd/js-sdk/merges","archive_url":"https://api.github.com/repos/unbxd/js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unbxd/js-sdk/downloads","issues_url":"https://api.github.com/repos/unbxd/js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/unbxd/js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/unbxd/js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/unbxd/js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unbxd/js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/unbxd/js-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/unbxd/js-sdk/deployments","created_at":"2014-03-29T10:09:19Z","updated_at":"2016-10-24T09:31:17Z","pushed_at":"2016-11-02T09:01:24Z","git_url":"git://github.com/unbxd/js-sdk.git","ssh_url":"git@github.com:unbxd/js-sdk.git","clone_url":"https://github.com/unbxd/js-sdk.git","svn_url":"https://github.com/unbxd/js-sdk","homepage":null,"size":603,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":6,"forks":14,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unbxd/js-sdk/pulls/38"},"html":{"href":"https://github.com/unbxd/js-sdk/pull/38"},"issue":{"href":"https://api.github.com/repos/unbxd/js-sdk/issues/38"},"comments":{"href":"https://api.github.com/repos/unbxd/js-sdk/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/unbxd/js-sdk/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/unbxd/js-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unbxd/js-sdk/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/unbxd/js-sdk/statuses/7f119ab5cf8b3d5f621179dd4608a332c9405eec"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"anuj610"}}