From 06b11953765011c677d647df5d7ef3a0095e6449 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 1 May 2014 11:44:13 +0100 Subject: [PATCH] Fix: Backwards compatiblity for the old bEscapeRegex option - which has now been replaced with the more sensible bRegex option --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 707afae5..437f04f8 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -e3be6800b2a627ed293acb71380ef15d18f47b91 +9b187f5327f95ae6eaa21ac9d2f2f2a9e3c91b21 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index dbef8eb4..c220f7f5 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2708,6 +2708,10 @@ oPrevSearch.bSmart = oFilter.bSmart; oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive; }; + var fnRegex = function ( o ) { + // Backwards compatibility with the bEscapeRegex option + return o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex; + }; // Resolve any column types that are unknown due to addition or invalidation // @todo As per sort - can this be moved into an event handler? @@ -2717,13 +2721,13 @@ if ( _fnDataSource( oSettings ) != 'ssp' ) { /* Global filter */ - _fnFilter( oSettings, oInput.sSearch, iForce, oInput.bRegex, oInput.bSmart, oInput.bCaseInsensitive ); + _fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive ); fnSaveFilter( oInput ); /* Now do the individual column filter */ for ( var i=0 ; i