主题: chrome下粘贴文本会产生无意义的代码
作者: 勇哥布林工程师, 发布日期: 2012-05-13 16:39:20, 浏览数: 3398

操作系统: windows 7

浏览器版本: chrome 18

KindEditor版本: 4.0.6, 4.1

BUG再现步骤:
1. 打开
http://www.kindsoft.net/ke4/examples/default.html

2. 粘贴如下文本:

1. User's
Acknowledgment and Acceptance of Terms
cheaperseeker.com ("Us" or
"We") provides the cheaperseeker site and various related services
(collectively, the "site") to you, the user, subject to your
compliance with all the terms, conditions, and notices contained or referenced
herein (the "Terms of Use"), as well as any other written agreement
between us and you. In addition, when using particular services or materials
on this site, users shall be subject to any posted rules applicable to such
services or materials that may contain terms and conditions in addition to
those in these Terms of Use. All such guidelines or rules are hereby
incorporated by reference into these Terms of Use.
BY USING THIS SITE, YOU AGREE TO BE BOUND
BY THESE TERMS OF USE. IF YOU DO NOT WISH TO BE BOUND BY THE THESE TERMS OF
USE, PLEASE EXIT THE SITE NOW. YOUR REMEDY FOR DISSATISFACTION WITH THIS
SITE, OR ANY PRODUCTS, SERVICES, CONTENT, OR OTHER INFORMATION AVAILABLE ON
OR THROUGH THIS SITE, IS TO STOP USING THE SITE AND/OR THOSE PARTICULAR
PRODUCTS OR SERVICES. YOUR AGREEMENT WITH US REGARDING COMPLIANCE WITH THESE
TERMS OF USE BECOMES EFFECTIVE IMMEDIATELY UPON COMMENCEMENT OF YOUR USE OF
THIS SITE.

 


 3. 查看粘贴后源代码,所有行都被“<span style="white-space:nowrap;">.....</span>”括起来了

 

4. 回到可视化模式,点击editor菜单的“清理HTML代码”按钮后,以上代码消失

 

5. ie下没有上述问题
 
期望结果:

chrome下粘贴后的html代码和清理代码后的一样,没有无用代码。

 


 

作者: 勇哥布林工程师, 发布日期: 2012-05-13 16:41:27

补充:

 

使用filter模式,粘贴后的代码每行会用“<span>...</span>"括起来,没有了style,但还是比清理后代码多一些无用元素。

 

IE下不会出现无用的"<span>...</span>"代码        

回复
作者: 观摩, 发布日期: 2012-05-13 17:17:45

唉,没人回复,前几天我在疑难解答区就提出这个问题了,没人理


现在4.1发布了,这个问题依旧存在。


Chrome浏览器下粘贴内容代码中出现white-space:nowrap导致不换行

http://www.kindsoft.net/view.php?bbsid=5&postid=5030&pagenum=1

回复
作者: 勇哥布林工程师, 发布日期: 2012-05-13 17:40:46
回复观摩:是啊,怎么搞的
回复
作者: Roddy, 发布日期: 2012-05-13 17:44:21
这个问题下个版本能修复,这次没来得及。
回复
作者: Roddy, 发布日期: 2012-05-14 22:14:15
回复
作者: 勇哥布林工程师, 发布日期: 2012-05-15 16:23:09

回复Roddy:更新了修复的代码,但在ie7先,编辑框显示不出来了。。。。

使用的ie9,document mode选择ie7kindeditor出不来            

回复
作者: hevin, 发布日期: 2012-05-15 16:33:25
chrome 20 dev还是那个会有出现无意义代码的那个问题。
回复
作者: Jack, 发布日期: 2012-05-16 09:15:39
回复Roddy:没有修复成功,18.0.1025.168 m还是出现了不能自动换行的<span style="white-space:nowrap;">代码。
回复
作者: ajsong, 发布日期: 2012-05-25 17:26:11

已经可以了,看这里
http://www.kindsoft.net/view.php?bbsid=7&postid=5148&pagenum=1

回复
发表新帖 发表回复