From d29cb2d1549d88c32f1919c3afa9eaee5514fa40 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 6 Oct 2016 21:48:10 +1300 Subject: [PATCH] Bug 14242: (follow-up) Strip hyphen from ISBN for search purposes To test, enter a valid ISBN complete with - eg 978-1-78416-110-1 The search should still work Signed-off-by: Marc Signed-off-by: Maryse Simard --- koha-tmpl/opac-tmpl/bootstrap/js/autofill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js index 171cc937a6d..23ef57a425e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js @@ -67,7 +67,7 @@ var gAPI = 'https://www.googleapis.com/books/v1/volumes?q='; if(self.type) gAPI += self.type + ':'; - gAPI += self.$elm.val(); + gAPI += self.$elm.val().replace(/\-/g, ''); gAPI += '&maxResults=1'; $.getJSON(gAPI, function (response) { if(response.totalItems == 0) { -- 2.11.0