Language: JavaScript
Label: safe
CWE: CWE-829 \u2014 Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.

Code:
        function format(data) {
            

            // Get all column visibility states
            var columnVisibleState = getDataTable.columns().visible();
            var childRowHtml = ''; //'<div class="slider">';

            data.forEach((item) => {

                childRowHtml += '<tr class="childRow" style="display: none; background-color: #f2fcff;">';

                item.forEach((itemData, index) => {

                    var headerClassName = getDataTable.columns().header()[index].className;

                    // If the column is visible, then append the child column with row
                    childRowHtml += columnVisibleState[index] ? `<td class='${headerClassName}'>${itemData}</td>` : '';

                })

                childRowHtml += '</tr>';

            });


            return $(childRowHtml).toArray();

        }