I have an ASP.NET MVC project, using Kendo MVC 2023 R1, and I am using a strict CSP policy. However, the following code is not working
<add name="Content-Security-Policy" value="script-src 'self'
Index.Cshml
<script id="editor-template" type="text/x-kendo-template">
@Html.Kendo().TextBox().Name("FieldExcel").Enable(false).ToClientTemplate()
</script>
in JS
$(document).ready(() => {
$(".list-item-icon").on("click", e => {
$("#edit-dialog").kendoWindow({
height: 320,
width: 415,
title: 'Editar',
visible: false
});
var thtml = $("#editor-template").html();
var htmlEncode = kendo.htmlEncode;
var templateString = () => thtml;
var template = kendo.template(templateString);
var data = { firstName: "Todd", age: 16 };
var result = template(data);
//var template = kendo.template($("#editor-template").html());
$("#edit-dialog").data("kendoWindow").content(template({})).open().center();
The result is a simple input text instead of a disabled Kendo control.
I have been trying many ways, and I can't find a solution