我有一串html代码,里面有一些额外的标签。我需要去掉额外的标记,但不能使用fn:escapeXML,因为这会使字符串不再作为html使用。示例:newLink的值设置为:
<a href="This is a <span class="help">test</span>">This is a <span class="help">test</span><
hidden" name = "studentName" value = "<%=viewBean.getStudName()%>">
问题是在<%=viewBean.getStudName()%>上,报告的问题是“网页中与脚本相关的超文本标记语言(Basic XSS)的不正确中和。我尝试过cwe.mitre.org中给出的修复程序,但我无法正确应用它。有谁可以帮助解决这个问题吗?”