![](/img/trans.png)
[英]How to Validate special characters in a textbox and show entered special characters in the error message?
[英]How to show message from resources with special characters?
我想在mvc中显示来自资源的警报中的消息,其中包含特殊字符,其中双引号或单引号也会出现,如果我的警报消息用双引号或单引号,它会生成引号的jquery错误。
那不是问题。 尝试在资源端使用HTML编码符号 - 链接
双引号是"
,单身 - '
单引号和双引号使用有效的html代码。 像这样
single quotes start =‘
single quotes end =’
double quotes start =“
double quotes end = ”
看到这个输出
单引号start ='
单引号end ='
双引号start =“
双引号end =“
尝试使用System.Web.HttpUtility.UrlEncode(mvcResourceMessage);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.