Kendo 网格的 Antixss
Antixss for Kendo Grid
Controller.cs
ViewData["Applications"] = await _applicationClient.GetAll();
view.cshtml
@(Html.Kendo().Grid<ResourceViewModel>
()
.Columns(columns =>
{columns.ForeignKey(r => r.ApplicationId, (System.Collections.IEnumerable)ViewData["Applications"], "Id", "Assembly").Title("Application").Width(100);})
ForeignKey列的antixss代码是什么?
保存到数据库时使用 HttpUtility.HtmlEncode(..) 解决了类似的问题。
HttpUtility.HtmlEncode(application);
Controller.cs
ViewData["Applications"] = await _applicationClient.GetAll();
view.cshtml
@(Html.Kendo().Grid<ResourceViewModel>
()
.Columns(columns =>
{columns.ForeignKey(r => r.ApplicationId, (System.Collections.IEnumerable)ViewData["Applications"], "Id", "Assembly").Title("Application").Width(100);})
ForeignKey列的antixss代码是什么?
保存到数据库时使用 HttpUtility.HtmlEncode(..) 解决了类似的问题。
HttpUtility.HtmlEncode(application);