Opened 9 years ago

Closed 9 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)

test_element_getOuterHtml.patch (1.8 KB) - added by Garry Yao 9 years ago.
Unit Test Case
3341.patch (537 bytes) - added by Garry Yao 9 years ago.
3341_2.patch (495 bytes) - added by Frederico Caldeira Knabben 9 years ago.
3341_3.patch (640 bytes) - added by Frederico Caldeira Knabben 9 years ago.
3341_4.patch (641 bytes) - added by Frederico Caldeira Knabben 9 years ago.

Download all attachments as: .zip

Change History (13)

Changed 9 years ago by Garry Yao

Unit Test Case

Changed 9 years ago by Garry Yao

Attachment: 3341.patch added

comment:1 Changed 9 years ago by Garry Yao

Keywords: IE Review? added
Status: newassigned

comment:2 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Garry Yao to Frederico Caldeira Knabben
Status: assignednew

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 9 years ago by Frederico Caldeira Knabben

Attachment: 3341_2.patch added

comment:3 Changed 9 years ago by Frederico Caldeira Knabben

Status: newassigned

Changed 9 years ago by Frederico Caldeira Knabben

Attachment: 3341_3.patch added

comment:4 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed

Added a new patch... it's always good to have weird stuff commented.

comment:5 Changed 9 years ago by Alfonso Martínez de Lizarrondo

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 9 years ago by Frederico Caldeira Knabben

Attachment: 3341_4.patch added

comment:6 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed

comment:7 Changed 9 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:8 Changed 9 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [3416].

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy