jsp使用fn:escapeXml()解决跨站脚本攻击

编程入门 行业动态 更新时间:2024-10-10 15:26:47

jsp使用fn:escapeXml()解决跨站<a href=https://www.elefans.com/category/jswz/34/1771291.html style=脚本攻击"/>

jsp使用fn:escapeXml()解决跨站脚本攻击

原代码

<textarea id="phraseContent" name="phraseContent" maxlength="1000" class="text_inp_type1 form-control"
style="height: 100px; width:200px; rows="10" value="${phrase.contentStr}"
hiddenonpropertychange="if(value.length>1000) value=value.substr(0,1000)"
value="" notempty="true" emptymsg="模板内容为必填项" maxlength="1000"
maxlenmsg="模板内容不能够超过1000个字符" >${phrase.contentStr}</textarea>

修改后

<textarea id="phraseContent" name="phraseContent" maxlength="1000" class="text_inp_type1 form-control"
style="height: 100px; width:200px; rows="10" value="${fn:escapeXml(phrase.contentStr)}"
hiddenonpropertychange="if(value.length>1000) value=value.substr(0,1000)"
value="" notempty="true" emptymsg="模板内容为必填项" maxlength="1000"
maxlenmsg="模板内容不能够超过1000个字符" >${fn:escapeXml(phrase.contentStr)}</textarea>
<label id="lblRed" class="font_red12">*</label><span id="_verify_phraseContent" style="color:red"></span>

更多推荐

jsp使用fn:escapeXml()解决跨站脚本攻击

本文发布于:2023-12-04 17:32:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1661693.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   jsp   fn   escapeXml

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!