#9436 closed Bug (invalid)
Span in IE8 not works correctly
Reported by: | Yinfeng.Guo | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.5 |
Keywords: | Span IE8 | Cc: | haobo.song@…, yinfeng.guo@… |
Description
Dear Sir or Madam,
Sorry for disturbing you.
We found a bug, the whole source code is as below:
<html> <head> <script type="text/javascript" src="../ckeditor.js"></script> </head> <body> <textarea id="a" ></textarea> <script type="text/javascript"> var b = CKEDITOR.replace("a"); b.setData('<span class="c"/><div>d<div>') </script> </body> </html>
The problem is:
In IE8, the code will change from
<span class="c"/><div>d<div>
to
<div> <span class="c">d</span> <div> </div> </div>
In conclusion: we don't want the char 'd' in the <span> tag.
We appreciate it if you could solve this. Many thanks in advance. :)
Have a good day!
Best Regards,
Yinfeng
Change History (3)
comment:1 Changed 12 years ago by
comment:2 follow-up: 3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
span
isn't self closing tag and can't be used with/>
. In your code span starts, but never ends, so parsers wraps entire content in it and then fixes this code, becausespan
wraps block elements. Fix this and issue 2. doesn't exist.- The same with the first issue - beside span issue, there are also two opened
divs
, but none is closed, so parser closes them for you. Results are fine.
comment:3 Changed 12 years ago by
Replying to Reinmar:
span
isn't self closing tag and can't be used with/>
. In your code span starts, but never ends, so parsers wraps entire content in it and then fixes this code, becausespan
wraps block elements. Fix this and issue 2. doesn't exist.- The same with the first issue - beside span issue, there are also two opened
divs
, but none is closed, so parser closes them for you. Results are fine.
Reinmar, Thanks a lot for your quick response, very helpful. Have a good day! :)
I find the above source code happens that problem in Chrome and IE9 too.
But the below code only happens in IE8:
In IE8, code will change to:
The span tag goes into the table tag.
Best Regards,
Yinfeng