1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Fix DataTables/DataTables #289 - Filtering can break with \n

- The removal on the \n\r characters should not be dependent upon there
  being HTML enties detected in the string
This commit is contained in:
Allan Jardine 2014-03-21 08:13:38 +00:00
parent b2a3546402
commit f5103cd6c4
2 changed files with 4 additions and 1 deletions

View File

@ -1 +1 @@
104b5fac846b79d567d21535737667cc3c91f305 72b058fd176f39d5b57fa13b8363323077b80fce

View File

@ -2868,6 +2868,9 @@
cellData = __filter_div_textContent ? cellData = __filter_div_textContent ?
__filter_div.textContent : __filter_div.textContent :
__filter_div.innerText; __filter_div.innerText;
}
if ( cellData.replace ) {
cellData = cellData.replace(/[\r\n]/g, ''); cellData = cellData.replace(/[\r\n]/g, '');
} }