datatables.net 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/dataTables.js +28 -8
- package/js/dataTables.min.js +2 -2
- package/js/dataTables.min.mjs +2 -2
- package/js/dataTables.mjs +28 -8
- package/package.json +1 -1
- package/types/types.d.ts +8 -1
package/js/dataTables.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DataTables 2.3.
|
|
1
|
+
/*! DataTables 2.3.2
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
_fnCamelToHungarian( defaults.column, defaults.column, true );
|
|
113
113
|
|
|
114
114
|
/* Setting up the initialisation object */
|
|
115
|
-
_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ), true );
|
|
115
|
+
_fnCamelToHungarian( defaults, $.extend( oInit, _fnEscapeObject($this.data()) ), true );
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
@@ -542,6 +542,11 @@
|
|
|
542
542
|
*/
|
|
543
543
|
errMode: "alert",
|
|
544
544
|
|
|
545
|
+
/** HTML entity escaping */
|
|
546
|
+
escape: {
|
|
547
|
+
/** When reading data-* attributes for initialisation options */
|
|
548
|
+
attributes: false
|
|
549
|
+
},
|
|
545
550
|
|
|
546
551
|
/**
|
|
547
552
|
* Legacy so v1 plug-ins don't throw js errors on load
|
|
@@ -4013,7 +4018,7 @@
|
|
|
4013
4018
|
if ( write ) {
|
|
4014
4019
|
if (unique) {
|
|
4015
4020
|
// Allow column options to be set from HTML attributes
|
|
4016
|
-
_fnColumnOptions( settings, shifted, jqCell.data() );
|
|
4021
|
+
_fnColumnOptions( settings, shifted, _fnEscapeObject(jqCell.data()) );
|
|
4017
4022
|
|
|
4018
4023
|
// Get the width for the column. This can be defined from the
|
|
4019
4024
|
// width attribute, style attribute or `columns.width` option
|
|
@@ -4259,7 +4264,7 @@
|
|
|
4259
4264
|
// to the object for the callback.
|
|
4260
4265
|
var empty = {};
|
|
4261
4266
|
|
|
4262
|
-
|
|
4267
|
+
_fnAjaxDataSrc(oSettings, empty, []);
|
|
4263
4268
|
callback(empty);
|
|
4264
4269
|
}
|
|
4265
4270
|
else {
|
|
@@ -5787,9 +5792,11 @@
|
|
|
5787
5792
|
var run = false;
|
|
5788
5793
|
var columns = column === undefined
|
|
5789
5794
|
? _fnColumnsFromHeader( e.target )
|
|
5790
|
-
:
|
|
5791
|
-
? column
|
|
5792
|
-
:
|
|
5795
|
+
: typeof column === 'function'
|
|
5796
|
+
? column()
|
|
5797
|
+
: Array.isArray(column)
|
|
5798
|
+
? column
|
|
5799
|
+
: [column];
|
|
5793
5800
|
|
|
5794
5801
|
if ( columns.length ) {
|
|
5795
5802
|
for ( var i=0, ien=columns.length ; i<ien ; i++ ) {
|
|
@@ -6854,6 +6861,19 @@
|
|
|
6854
6861
|
}
|
|
6855
6862
|
}
|
|
6856
6863
|
|
|
6864
|
+
/**
|
|
6865
|
+
* Escape HTML entities in strings, in an object
|
|
6866
|
+
*/
|
|
6867
|
+
function _fnEscapeObject(obj) {
|
|
6868
|
+
if (DataTable.ext.escape.attributes) {
|
|
6869
|
+
$.each(obj, function (key, val) {
|
|
6870
|
+
obj[key] = _escapeHtml(val);
|
|
6871
|
+
})
|
|
6872
|
+
}
|
|
6873
|
+
|
|
6874
|
+
return obj;
|
|
6875
|
+
}
|
|
6876
|
+
|
|
6857
6877
|
|
|
6858
6878
|
|
|
6859
6879
|
/**
|
|
@@ -10199,7 +10219,7 @@
|
|
|
10199
10219
|
* @type string
|
|
10200
10220
|
* @default Version number
|
|
10201
10221
|
*/
|
|
10202
|
-
DataTable.version = "2.3.
|
|
10222
|
+
DataTable.version = "2.3.2";
|
|
10203
10223
|
|
|
10204
10224
|
/**
|
|
10205
10225
|
* Private data store, containing all of the settings objects that are
|