Skip to content

Commit 70b3138

Browse files
author
dtbuild
committed
8283888a3ef13b0f884100947577e21c8d4c852f Fix: Multi-line html elements could still cause issues for column sizing
Back ported from `3` DataTables/DataTablesSrc@36a4dac Sync to source repo @8283888a3ef13b0f884100947577e21c8d4c852f
1 parent 53ff1d8 commit 70b3138

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

datatables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
],
1212
"src-repo": "http://github.com/DataTables/DataTablesSrc",
1313
"last-tag": "2.3.7",
14-
"last-sync": "707891039fe995c2f107f453361a954f871eb16c"
14+
"last-sync": "8283888a3ef13b0f884100947577e21c8d4c852f"
1515
}

js/dataTables.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5729,9 +5729,9 @@
57295729
// Don't want script, dialog or template tags in the width
57305730
// calculations as they are hidden content
57315731
cellString = cellString
5732-
.replace(/<script.*?<\/script>/gi, ' ')
5733-
.replace(/<dialog.*?<\/dialog>/gi, ' ')
5734-
.replace(/<template.*?<\/template>/gi, ' ');
5732+
.replace(/<script[\s\S]*?<\/script>/gi, ' ')
5733+
.replace(/<dialog[\s\S]*?<\/dialog>/gi, ' ')
5734+
.replace(/<template[\s\S]*?<\/template>/gi, ' ');
57355735

57365736
var noHtml = _stripHtml(cellString, ' ')
57375737
.replace( /&nbsp;/g, ' ' );

js/dataTables.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dataTables.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

js/dataTables.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5694,9 +5694,9 @@ function _fnGetWideStrings( settings, colIdx )
56945694
// Don't want script, dialog or template tags in the width
56955695
// calculations as they are hidden content
56965696
cellString = cellString
5697-
.replace(/<script.*?<\/script>/gi, ' ')
5698-
.replace(/<dialog.*?<\/dialog>/gi, ' ')
5699-
.replace(/<template.*?<\/template>/gi, ' ');
5697+
.replace(/<script[\s\S]*?<\/script>/gi, ' ')
5698+
.replace(/<dialog[\s\S]*?<\/dialog>/gi, ' ')
5699+
.replace(/<template[\s\S]*?<\/template>/gi, ' ');
57005700

57015701
var noHtml = _stripHtml(cellString, ' ')
57025702
.replace( /&nbsp;/g, ' ' );

0 commit comments

Comments
 (0)