From b35efaffa56ca6fc7aac702f14ce13e34562f410 Mon Sep 17 00:00:00 2001 From: Joseph Lewis Date: Tue, 24 Jul 2012 10:58:40 -0600 Subject: [PATCH] Replaced the Trim regex in Util.js so it passes unittesting. 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 5745fad574..feae75e99a 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*$/,"$1"); + return s.replace(/^\s+|\s+$/g,""); } /** -- 2.11.0