From 69bcdf36be01aa7b5ce59b6b2c86f0e65fa22943 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 2 Dec 2016 17:54:46 +0000 Subject: [PATCH] Fix: Using `-init columns.data` to access a data point which uses a backslash in its name would result in an error due to an incorrectly escaped regex. - Fixes DataTables/DataTables #869 --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 2 +- media/js/jquery.dataTables.min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 3239424c..cdef7ee6 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -4363d7fec5b4c0ee5f630872d6db757564ecb969 +4092fd12e2221b694647a47334561c568f73a60f diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index d0130e4c..d4048e66 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2538,7 +2538,7 @@ function _fnSplitObjNotation( str ) { return $.map( str.match(/(\\.|[^\.])+/g) || [''], function ( s ) { - return s.replace(/\\./g, '.'); + return s.replace(/\\\./g, '.'); } ); } diff --git a/media/js/jquery.dataTables.min.js b/media/js/jquery.dataTables.min.js index 9c38d2d7..443f6c4a 100644 --- a/media/js/jquery.dataTables.min.js +++ b/media/js/jquery.dataTables.min.js @@ -15,7 +15,7 @@ c);return-1!==c?c:null}function ba(a){var b=0;h.each(a.aoColumns,function(a,d){d q=d[g](s[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function kb(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;fq[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;jb&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);