From 6d934e6825257f6ce9c90f46224a9914a8cd2de4 Mon Sep 17 00:00:00 2001 From: Joseph Lewis Date: Tue, 24 Jul 2012 14:27:00 -0600 Subject: [PATCH] Updated Util.js to work with the regex tsbere suggested might be better. Signed-off-by: Joseph Lewis --- Open-ILS/web/js/dojo/openils/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/web/js/dojo/openils/Util.js b/Open-ILS/web/js/dojo/openils/Util.js index feae75e99a..1fc363ac0b 100644 --- a/Open-ILS/web/js/dojo/openils/Util.js +++ b/Open-ILS/web/js/dojo/openils/Util.js @@ -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"); } /** -- 2.11.0