Opened 11 years ago
Closed 11 years ago
#13101 closed Bug (fixed)
IE8 adds colon before HTML5 tags
| Reported by: | Piotr Jasiun | Owned by: | Piotr Jasiun |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.5.0 Beta |
| Component: | General | Version: | 4.0 Beta |
| Keywords: | Cc: |
Description
There are some problems with HTML5 on IE8.
- IE8 adds colon before HTML5 tags when native clone is called, this should be fixed.
- There are a problem with document fragment.
getHtmlFromRangeshould works fine with HTML5 tags on IE8.
Needs tests and fixes.
Attachments (1)
Change History (11)
comment:1 Changed 11 years ago by
| Owner: | set to Piotr Jasiun |
|---|---|
| Status: | new → assigned |
comment:2 Changed 11 years ago by
| Summary: | IE8 add colon before HTML5 tags → IE8 adds colon before HTML5 tags |
|---|
Changed 11 years ago by
| Attachment: | td-tr-ie8.html added |
|---|
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
| Status: | assigned → review |
|---|
node.clone and documentFragment.getHtml seems to be the only two places which were broken. I decided to fixed them touching as little code as it is possible, so the fix for the edge case does not bring some more serious problems.
- In
node.cloneI iterate over the tree and replace nodes which names start with colons. Most probably previous fix would work if we add '_' a the begging of the string and remove it later, but it would totally change the behavior ofclonemethod on IE8 and could bring new bugs. - In
documentFragment.getHtmlI use regexp on the output string. I tried to use fixedclonemethod there, but it seems not to work ondocumentFragment. I have changed that method so it do withdocumentFragmentthe same it do withelement, but the resultouterHTMLstill contain colons.
comment:5 Changed 11 years ago by
I also checked if it makes sens to enableHtml5Elements on every documentFramgent, but it does not, because the only case we need to do this is setting innterHtml, so the native fragment is needed and for that case we already have _getHtml5ShivFrag helper. If we add HTML5 elements any other way, ex. by adding child node with the HTML5, then enableHtml5Elements change nothing.
comment:7 Changed 11 years ago by
| Status: | review → review_failed |
|---|
I pushed one additional commit to branch:t/13101b that shows how to use clone() with docFrag. The problem was inside renameNode() which didn't work with elements inside document fragments.
comment:8 Changed 11 years ago by
| Status: | review_failed → assigned |
|---|
comment:9 Changed 11 years ago by
| Status: | assigned → review |
|---|
Fixed some details and added tests. Changes in t/13101b. Branch rebased on the newest major.
comment:10 Changed 11 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
| Version: | → 4.0 Beta |
Fixed on major with git:7342d18.

Unfortunately
div.innerHTML = element.outerHTMLas a workaround forcloneNodeas it is described here does not work (see attachment). We need another solution.