Zk框架:如何从工具提示中转义HTML?

时间:2015-04-22 12:28:25

标签: html tooltip zk

我正在使用以下代码

<label  value="${comment.folderCommentRecord.comments}"  tooltiptext="${comment.folderCommentRecord.comments}"></label>

tooltiptext 属性无法转义html字符以显示我在代码下方使用的数据并且能够转义html章程

<html>
    <x:div style="overflow:hidden;height:20px;">
    <![CDATA[${comment.folderCommentRecord.comments}
                                        ]]>
    </x:div>
</html>

任何人都可以指导我如何从工具提示中删除html?

1 个答案:

答案 0 :(得分:0)

这是解决方案

<html>

 <![CDATA[
    <x:label title="${comment.folderCommentRecord.comments}">${comment.folderCommentRecord.comments}</x:label>

  ]]>

  </html>