充满<span>标签
cleditor content riddled with <span> tags
我使用cleditor作为WordPress插件中的富文本编辑器。
然而,似乎是随机的,它决定在我的内容中插入<span class="Apple-style-span">
。
我在谷歌上快速搜索了一下,找不到cleditor
的任何内容,但显然ckeditor
在Webkit浏览器上也有类似的错误——我网站上的两位内容作者都使用谷歌Chrome。这已被记录为webkit的错误。
除了在保存或查看内容时执行PHP str_replace
之外,有人知道如何解决这个问题吗?
以下是输出示例:
<h2 id="notes" class="profile_notes">Notes</h2>
<p>
<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">
<div>
This species is assigned the codes A220, A221 and A222 under the DATZ 'A' number system with these referring to similar-looking, possibly conspecific, populations. These differ in some aspects of colour pattern, particularly the orientation of the caudal-fin markings which may be horizontal, vertical, or somewhere inbetween.
</div>
<div>
<br>
</div>
<div>
One population displays an orange colouration on the belly and is sometimes referred to as A. mendezi 'orange' (A222) while another known as A. sp. 'fork-band' or 'gabelband' and collected in the rio Jaú may also represent a form of A. mendezi.
</div>
<div>
<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">
<br>
</span>
</div>
Apistogramma is...
</div>
</span>
</p>
提前感谢,
这是一个"功能",当用javascript调用execcommand
时会出现(在不同的浏览器中会有不同的结果),在http://www.quirksmode.org/dom/execCommand.html
我不知道在浏览器中是否可以绕过这一点,但我对此表示怀疑。最好的方法是使用lxml或BeautifulSoup在后台剪切"冒犯"的HTML类。
相关文章:
- 在<页眉>标签
- Ckeditor-plugin:插入虚假元素add不情愿<p>标签前后
- </脚本>标签放错地方了
- Jquery在点击<a>标签
- Ionic V1.3-标签-带条件的徽章样式<离子选项卡>
- <选择>标签不起作用
- 如何在<嵌入>标签在Plone 4.1中
- 在<script src=“"></脚本>标签
- 使用几个<脚本>标签不会't工作-只调用一个脚本
- 如何在更新面板内部调用/触发javascript函数<触发器>标签
- react-让一个元素返回两个相邻的<tr>标签
- <h1>标签在离子含量元素中不可见
- VS代码:在<脚本>标签
- 在</表单>标签
- Meteor.js:<脚本>标签不't在<身体>
- 替换<标签>,包含的表单控件除外
- 使用jQuery加载基于<标签>目录
- 可以't在<标签>标签
- 更改只有<标签>标记在<李>
- 点击<标签>在Mobile Safari中