Merge pull request #7 from netj/num-html-multiline-tags

num-html type detect/sorting works with multiline
pull/8/head
Allan Jardine 12 years ago
commit d313bf86f2

@ -11,7 +11,7 @@
jQuery.extend( jQuery.fn.dataTableExt.oSort, { jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"num-html-pre": function ( a ) { "num-html-pre": function ( a ) {
var x = a.replace( /<.*?>/g, "" ); var x = String(a).replace( /<[\s\S]*?>/g, "" );
return parseFloat( x ); return parseFloat( x );
}, },

@ -11,7 +11,7 @@
jQuery.fn.dataTableExt.aTypes.unshift( function ( sData ) jQuery.fn.dataTableExt.aTypes.unshift( function ( sData )
{ {
sData = typeof sData.replace == 'function' ? sData = typeof sData.replace == 'function' ?
sData.replace( /<.*?>/g, "" ) : sData; sData.replace( /<[\s\S]*?>/g, "" ) : sData;
sData = $.trim(sData); sData = $.trim(sData);
var sValidFirstChars = "0123456789-"; var sValidFirstChars = "0123456789-";

Loading…
Cancel
Save