Q: 使用开源jquery.tmpl.js, 变量内的html编码不能被识别的问题
e.g.
fileName = <font color="red">27</font>
<em><a href='/inforone/loadServlet?url=${getUrl(fileUrl)}' style='font-size:14px;font-weight:bold'>{${fileName}</a></em>
显示为:<font color="red">27</font>
A:
e.g.
<em><a href='/inforone/loadServlet?url=${getUrl(fileUrl)}' style='font-size:14px;font-weight:bold'>{{html fileName}}</a></em>
显示为:27(红色字体)
Refer:
http://www.shangxueba.com/jingyan/1906228.html
http://www.cnblogs.com/zhuzhiyuan/p/3510175.html
PS.
这东东(jquery.tmpl)是有它的方便性,特别是重用度高时,不过嘛,debug起来不是一般的麻烦,语法也怪怪的,个人不太喜欢用。