Updated Util.js to work with the regex tsbere suggested might be better.
authorJoseph Lewis <joehms22@gmail.com>
Tue, 24 Jul 2012 20:27:00 +0000 (14:27 -0600)
committerJoseph Lewis <joehms22@gmail.com>
Tue, 24 Jul 2012 20:27:00 +0000 (14:27 -0600)
Signed-off-by: Joseph Lewis <joehms22@gmail.com>
Open-ILS/web/js/dojo/openils/Util.js

index feae75e..1fc363a 100644 (file)
@@ -292,7 +292,7 @@ if(!dojo._hasResource["openils.Util"]) {
      * Convenience function to trim leading and trailing whitespace at once.
      */
     openils.Util.trimString = function(s) {
-        return s.replace(/^\s+|\s+$/g,"");
+        return s.replace(/^\s*(.*?)\s*$/,"$1");
     }
 
     /**