从jsp变量中消除单引号和双引号的最佳方法是什么?
假设text="hsdhakb'asda"'ass'as'd"
text="hsdhakb'asda"'ass'as'd"
我们有两个选择
使用fn:replace或fn:escapeXml()
fn:replace
fn:escapeXml()
<c:set var='text' value='${text}'/>
发布于 2013-08-09 03:36:17
您可以查看StringEscapeUtils
https://stackoverflow.com/questions/18134140
相似问题