Language: JavaScript
Label: safe
CWE: CWE-352 \u2014 Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.

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();

        }