From fc8afa202c42f89bce02d7034176ba1e29e0c822 Mon Sep 17 00:00:00 2001 From: Clotaire <52157233+clotairer@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:25:11 +0100 Subject: [PATCH] Fix code scanning alert no. 1: DOM text reinterpreted as HTML (#397) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- views/js/form_config_filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/js/form_config_filter.js b/views/js/form_config_filter.js index 4af20839..8e7812e0 100644 --- a/views/js/form_config_filter.js +++ b/views/js/form_config_filter.js @@ -50,7 +50,7 @@ $(document).ready(function() { product_rule_line.attr('data-type', $( "#product_rule_type option:selected").val()); product_rule_line.find(".product_input input:eq(0)") .attr('name', 'product_rule_select[' + $("#product_rule_type option:selected").val() + '][]'); - product_rule_line.find('.type').html($( "#product_rule_type option:selected" ).text()); + product_rule_line.find('.type').text($( "#product_rule_type option:selected" ).text()); $('#product_rule_table tbody').append(product_rule_line); });