更新wtm
This commit is contained in:
1 parent
f119665d29
commit
3467d4aa9d
60 files changed
+1932
-397
No files matched your search
@@ -1,7 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
@@ -48,8 +50,9 @@ namespace WalkingTec.Mvvm.Mvc.Binders
|
||||
.MethodInfo
|
||||
.CustomAttributes
|
||||
.Where(x => x.AttributeType == typeof(StringNeedLTGTAttribute)).Count();
|
||||
|
||||
if (count == 0)
|
||||
var count2 = (bindingContext.ModelMetadata as DefaultModelMetadata)?.Attributes?.PropertyAttributes?
|
||||
.Where(x => x.GetType() == typeof(JsonConverterAttribute)).Count();
|
||||
if (count == 0 && (count2==null || count2 == 0))
|
||||
{
|
||||
value = HttpUtility.HtmlEncode(value);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user