Bug found in dataTable.button.js

Bug found in dataTable.button.js

adameskaadameska Posts: 1Questions: 1Answers: 0

I found a bug when trying to export csvHtml5 in dataTables. The strip method crashes on numbers, can you add a check to make sure it's a string first?

var strip = function (str) {
if (typeof str == "string") {
if (config.stripHtml) {
str = str.replace(/<.*?>/g, '');
}

        if (config.trim) {
            str = str.replace(/^\s+|\s+$/g, '');
        }

        if (config.trim) {
            str = str.replace(/\n/g, ' ');
        }
    }       

    return str;
};

Answers

  • allanallan Posts: 63,356Questions: 1Answers: 10,444 Site admin

    Have you tried using the nightly version? If not, I would suggest trying that as this should be resolved already. If not, then please link to a test case showing the issue.

    Allan

This discussion has been closed.