javascript - MVC - Kendo Template Giving Error When Using with special language characters -


on mvc project there language resource(.resx) files.trying pass strings values kendo template.if value has special characters 'ç' , 'ş' etc... gives error:

html- razor:

@(html.kendo().listview<ais.ui.webservice.proxy.dsrvallservice.caselistitemmodel>()             .name("listview")             .tagname("div")             .htmlattributes(new { style = "padding-left:15px" })             .clienttemplateid("template")             .datasource(datasource => datasource             .model(model => model.id("caseid"))             .pagesize(5)             .events(events => events.error("onerror"))             .read(read => read.action("getlistcases", "case"))                )             .pageable()             .editable()          )     <script type="text/x-kendo-tmpl" id="template" >   <span>@caselist.elapsed</span> 

error:

        uncaught error: invalid template:' 

value of elapsed contains 'ç' character getting error.

using @html.raw() fixed poblem.like this:

  <span>@html.raw(@caselist.elapsed)</span> 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -