struts2 升级到2.3.8后 使用property标签 html字符转义
2013-07-26 11:24
302 查看
昨天升级了struts2 的jar。 今天就看见后台
共有[<font color='#FF0000'>299</font>]条记录,1/60页。 <a href='JavaScript:tuneNewProductPage(1,5)'><font color='#FF0000'><b>1</b></font></a> <a href='JavaScript:tuneNewProductPage(2,5)'>2</a> <a
href='JavaScript:tuneNewProductPage(3,5)'>3</a> <a href='JavaScript:tuneNewProductPage(4,5)'>4</a> <a href='JavaScript:tuneNewProductPage(5,5)'>5</a> <a href='JavaScript:tuneNewProductPage(6,5)'>...</a> <a href='JavaScript:tuneNewProductPage(2,5)'><font face='Webdings'>8</font></a>
<a href='JavaScript:tuneNewProductPage(60,5)'><font face='Webdings'>:</font></a>
页面数据全是Html代码,还有很多奇怪的报错,追查之下 才发现 全是struts2.3.8 的原因,以前的版本使用
标签没有对 含有html标签的字符进行转义,升级之后就转义了,导致页面数据显示不正确,
加上
就 能正常显示了
共有[<font color='#FF0000'>299</font>]条记录,1/60页。 <a href='JavaScript:tuneNewProductPage(1,5)'><font color='#FF0000'><b>1</b></font></a> <a href='JavaScript:tuneNewProductPage(2,5)'>2</a> <a
href='JavaScript:tuneNewProductPage(3,5)'>3</a> <a href='JavaScript:tuneNewProductPage(4,5)'>4</a> <a href='JavaScript:tuneNewProductPage(5,5)'>5</a> <a href='JavaScript:tuneNewProductPage(6,5)'>...</a> <a href='JavaScript:tuneNewProductPage(2,5)'><font face='Webdings'>8</font></a>
<a href='JavaScript:tuneNewProductPage(60,5)'><font face='Webdings'>:</font></a>
页面数据全是Html代码,还有很多奇怪的报错,追查之下 才发现 全是struts2.3.8 的原因,以前的版本使用
<s:property value="" />
标签没有对 含有html标签的字符进行转义,升级之后就转义了,导致页面数据显示不正确,
加上
<s:property escape="false" value="" />
就 能正常显示了
相关文章推荐
- 使用标签对HTML特殊字符进行转义
- html、javascript、url特殊字符的转义诠释及使用方法详解
- struts2在前台通过property获取属性值某些字符转义问题
- struts2 <s:property/>标签的使用--输出时间格式转换
- struts2在前台通过property获取属性值某些字符转义问题
- 使用Js让Html中特殊字符不被转义
- struts2 iterator标签内使用property标签无法获取迭代对象以外的值的解决方法
- struts2标签<s:property 输出带有html标签的字符串的解决方案
- struts2 标签 property中对HTML标签输出
- 使用<a>标签调用struts2的action、传递动态参数、以及参数中出现加号等特殊字符的处理方法
- java web过滤器实际应用(解决中文乱码 html标签转义功能 敏感字符过滤功能)
- Struts2获取HTML表单元素与Struts表单标签的区别使用-基础篇
- (有效)struts2 标签 property中对HTML标签输出
- java web过滤器实际应用(解决中文乱码 html标签转义功能 敏感字符过滤功能)
- 开发日志:使用struts2标签[<s:if><s:property>等]获取boolean属性需注意
- 使用Js让Html中特殊字符不被转义
- struts2 <s:property/>标签的使用
- thinkphp使用在线编辑器存入html标签被转义解决
- 如何让在Html中特殊字符被数据加载时对于html标签的自动转义 补充
- 使用struts2标签输出带html标签的文本内容