【发布时间】:2015-03-07 17:17:59
【问题描述】:
我有 DocumentVariable(带有 blob 数据的 Struts Bean 变量),其中包含数据和 Html 标记。如何删除html标签并只显示文本。
<s:label name="documentDAO.documentAllContent" />
<p>/*<br /> * This is a JavaScript Scratchpad.<br /> *<br /> * Enter some JavaScript, then Right Click or choose from the Execute Menu:<br /> * 1. Run to evaluate the selected text (Ctrl+R),<br /> * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,<br /> * 3. Display to insert the result in a comment after the selection. (Ctrl+L)<br /> */</p> <p> </p>
【问题讨论】:
-
你为什么使用
<s:label>标签?使用<s:property>- 默认转义html。 -
我正在使用来自 CKEditor 的数据,即使我正在使用
我正在获取带有标签的数据。 sfhsdfhsdf
sfdhsfdhsfdhsfdhsdfh
hgdf
-
你想逃避它们吗?如果没有,则将
escapeHtml属性设置为 false。 -
我想删除html标签并在jsp上显示纯文本
-
没有格式化?那你为什么要用ckeditor呢?
标签: java html jsp struts2 blob