From 53c1859d1f15bd345e23ebba7624457924b75c0f Mon Sep 17 00:00:00 2001 From: duongtd96 <tranduongthhd@gmail.com> Date: Thu, 10 Jan 2019 17:35:11 +0700 Subject: [PATCH] minor change - Solve #415 --- sorting/intl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorting/intl.js b/sorting/intl.js index 8d81688..c371ae1 100644 --- a/sorting/intl.js +++ b/sorting/intl.js @@ -83,10 +83,10 @@ $.fn.dataTable.ext.order.intl = function ( locales, options ) { // only compare inner text delete types.order['html-pre']; types.order['html-asc'] = function (a, b) { - return collator.compare( $(a)[0].innerHTML, $(b)[0].innerText ); + return collator.compare($(a).text(), $(b).text()); } types.order['html-desc'] = function ( a, b ) { - return collator.compare( $(a)[0].innerHTML, $(b)[0].innerText ) * -1; + return collator.compare($(a).text(), $(b).text()) * -1; }; } };