我的输入装饰如下.
<AllowHtml()>
<UIHint("MarkDown")>
<DisplayName("about")>
<Required(ErrorMessage:="Description is required")>
<StringLength(2048, ErrorMessage:="Description is too long")>
Public Property Description As String
Run Code Online (Sandbox Code Playgroud)
我的编辑器模板看起来像这样
@ModelType String
<noscript><h3>Please use @Html.ActionLink("Markdown", "Markdown", "About") to style your input.</h3></noscript>
<div id="wmd-button-bar" class="wmd-panel"></div>
@Html.TextArea("", Model, 5, 10, New With {.id = "wmd-input", .class = "wmd-panel"})
<div id="wmd-preview" class="wmd-panel"></div>
<div class="clear"></div>
Run Code Online (Sandbox Code Playgroud)
当我尝试故意提交<script>标签时,我得到了YSOD
从客户端检测到潜在危险的Request.Form值(Description ="...
<script>
here.var a = b; ...").
我的问题:我该如何做这项工作?
这是控制器动作方法
''# fix stack overflow code coloring
''# <AcceptVerbs(HttpVerbs.Post)>
Function Edit(ByVal user As Domain.User, ByVal id As Integer) …Run Code Online (Sandbox Code Playgroud)