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:
            "stateSaveParams": function(settings, data) {

                var api = this.api();
                
                // Disable search, order and length in stateSave
                data.search.search = "";
                data.length = 15;
                data.order = DtDefaultOrder;

                // Set the select text on filter
                data.columns.forEach( (item, i) => {

                    var footer = api.column(i).footer();

                    var filterObject = $(footer).find("select");

                    if( filterObject.length > 0 ) {
                        
                        // Add option text in the state
                        data.columns[i].search.text = $(filterObject).find(":selected").text();

                    }

                });

            },