Skip to content

Commit

Permalink
Quote search string, so searches with spaces work
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed Nov 26, 2018
1 parent b5fc6e7 commit 14a42a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
### Fixed
- Escape document search ([#98](https://github.com/pwyf/iati-decipher/issues/98))
- Quote search string, so searches with spaces work ([#99](https://github.com/pwyf/iati-decipher/issues/99))

## [1.3.0] - 2018-11-25
### Fixed
Expand Down
24 changes: 12 additions & 12 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ $(function () {
return false
})

var tmpl = 'https://iatiregistry.org/api/3/action/package_search?fq=extras_filetype:organisation&q=title:{}' +
' OR license_id:{}' +
' OR maintainer:{}' +
' OR maintainer_email:{}' +
' OR author_email:{}' +
' OR name:{}' +
' OR organization_name:{}' +
' OR organization_title:{}' +
' OR organization_description:{}' +
' OR extras_country:{}' +
' OR extras_publisher_country:{}' +
' OR extras_publisher_iati_id:{}'
var tmpl = 'https://iatiregistry.org/api/3/action/package_search?fq=extras_filetype:organisation&q=title:"{}"' +
' OR license_id:"{}"' +
' OR maintainer:"{}"' +
' OR maintainer_email:"{}"' +
' OR author_email:"{}"' +
' OR name:"{}"' +
' OR organization_name:"{}"' +
' OR organization_title:"{}"' +
' OR organization_description:"{}"' +
' OR extras_country:"{}"' +
' OR extras_publisher_country:"{}"' +
' OR extras_publisher_iati_id:"{}"'

$('#org-file-name').on('keyup', debounce(function () {
var searchStr = $(this).val()
Expand Down

0 comments on commit 14a42a2

Please sign in to comment.