mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Fix: If sType for a column is html and the data is null, then _fnDataToSearch could throw an error - 8987
This commit is contained in:
parent
c22dfe00d3
commit
b5f4938d7d
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -2306,6 +2306,10 @@
|
||||
{
|
||||
return DataTable.ext.ofnSearch[sType]( sData );
|
||||
}
|
||||
else if ( sData === null )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
else if ( sType == "html" )
|
||||
{
|
||||
return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" );
|
||||
@ -2314,10 +2318,6 @@
|
||||
{
|
||||
return sData.replace(/[\r\n]/g," ");
|
||||
}
|
||||
else if ( sData === null )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
return sData;
|
||||
}
|
||||
|
||||
|
@ -372,6 +372,10 @@ function _fnDataToSearch ( sData, sType )
|
||||
{
|
||||
return DataTable.ext.ofnSearch[sType]( sData );
|
||||
}
|
||||
else if ( sData === null )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
else if ( sType == "html" )
|
||||
{
|
||||
return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" );
|
||||
@ -380,10 +384,6 @@ function _fnDataToSearch ( sData, sType )
|
||||
{
|
||||
return sData.replace(/[\r\n]/g," ");
|
||||
}
|
||||
else if ( sData === null )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
return sData;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user