Make sure that # can be used in auth browse
authorMike Rylander <mrylander@gmail.com>
Thu, 24 Oct 2013 20:10:00 +0000 (16:10 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 28 Oct 2013 19:40:28 +0000 (15:40 -0400)
Because we use URLs to call the SuperCat browse API, we need to
be more careful about encoding parameters.  #, in particular, breaks
auth browse because it's seen as a URL fragment separator by the browser
and web server.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Yamil Suarez <yamil@yamil.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/cat/authority/list.js

index 2bd19bf..4c42b90 100644 (file)
@@ -379,7 +379,7 @@ function displayRecords(parms) {
         + dijit.byId('authAxis').attr('value')
         // + '/' + dijit.byId('authOU').attr('value')
         + '/1' // replace with preceding line if OUs gain some meaning
-        + '/' + dijit.byId('authTerm').attr('value')
+        + '/' + encodeURIComponent(dijit.byId('authTerm').attr('value'))
         + '/' + dijit.byId('authPage').attr('value')
         + '/' + '20' // 20 results per page
     ;