脚本攻击"/>
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()解决跨站脚本攻击
发布评论