Opened 15 years ago
Closed 15 years ago
#3341 closed Bug (fixed)
[IE] getOuterHtml incorrect for namespaced element name
Reported by: | Garry Yao | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | |
Keywords: | IE Confirmed Review+ | Cc: |
Description
IE is returning the namespace definition as the following along with the 'outerHtml' when creating an element with tag name 'cke:custom', which is unexpected.
<?xml:namespace prefix="cke" />
Attachments (5)
Change History (13)
Changed 15 years ago by
Attachment: | test_element_getOuterHtml.patch added |
---|
Changed 15 years ago by
Attachment: | 3341.patch added |
---|
comment:1 Changed 15 years ago by
Keywords: | IE Review? added |
---|---|
Status: | new → assigned |
comment:2 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Owner: | changed from Garry Yao to Frederico Caldeira Knabben |
Status: | assigned → new |
The TC is good. I can't tell the same for the path though.
The patch is limiting the fix for elements with "cke:" namespace only. There is no need fur such limitation, as it's quite easy to match the <?xml:namespace> tag.
Actually, we we are already spending time with a regex test, let's simply strip the <?xml:namespace> tag from the string when returning it. The replacement would still perform better than a DOM manipulation.
I'm coming with a new patch for it.
Changed 15 years ago by
Attachment: | 3341_2.patch added |
---|
comment:3 Changed 15 years ago by
Status: | new → assigned |
---|
Changed 15 years ago by
Attachment: | 3341_3.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
Added a new patch... it's always good to have weird stuff commented.
comment:5 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
That regexp should be
<\?[^>]*>
as the ? is a very special character in regexp.
Another approach (haven't tested and it might not be worth) would be to declare the namespace in the head of the document, so that it isn't included in the body.
Changed 15 years ago by
Attachment: | 3341_4.patch added |
---|
comment:6 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:7 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Unit Test Case