格式转换解决存取数据安全问题

前端:

body1 = body1.replace(/</g, '&lt;');
body1 = body1.replace(/>/g, '&gt;');
body1 = body1.replace(/"/g, '&quot;');

后台:

body = context.Server.HtmlDecode(body);  //解码
body = context.Server.HtmlEncode(body);  //编码
原文地址:https://www.cnblogs.com/m110/p/8378159.html