Add missing ? to url_prefix regex check
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 23 Oct 2012 20:27:00 +0000 (16:27 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Tue, 23 Oct 2012 21:05:27 +0000 (17:05 -0400)
Fixes Barcode Completion and who knows what else.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js

index 207e1f8..09c8671 100644 (file)
         if(base_url) {
             base_url = base_url[0];
             if(urls[base_url])
-                url = url.replace(/^[^?/|]+\|/, urls[base_url]);
+                url = url.replace(/^[^?/|]+\|?/, urls[base_url]);
         }
         if (url.match(/^\//)) url = urls.remote + url;
         if (! url.match(/^(http|https|chrome|oils):\/\//) && ! url.match(/^data:/) ) url = 'http://' + url;