From df36ae331d0ca7bc9a9e9a81a4f21d69e156e224 Mon Sep 17 00:00:00 2001 From: Mottie Date: Mon, 20 Oct 2014 23:34:38 -0500 Subject: [PATCH] Filter: clean up white-space in data-column --- js/jquery.tablesorter.widgets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index bf97bef0..46f9c07f 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -1049,7 +1049,7 @@ ts.filter = { // look for multiple columns "1-3,4-6,8" in data-column var ranges, singles, indx, columns = [], - val = ts.filter.getLatestSearch( $input ).attr('data-column'); + val = $.trim( ts.filter.getLatestSearch( $input ).attr('data-column') ); // process column range if ( /-/.test( val ) ) { ranges = val.match( /(\d+)\s*-\s*(\d+)/g ); @@ -1069,7 +1069,7 @@ ts.filter = { } // process single columns if ( /,/.test( val ) ) { - singles = val.split(','); + singles = val.split( /\s*,\s*/ ); $.each( singles, function(i,v) { if (v !== '') { indx = parseInt( v, 10 );