Ticket #3341 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

[IE] getOuterHtml incorrect for namespaced element name

Reported by: garry.yao Owned by: fredck
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

test_element_getOuterHtml.patch (1.8 KB) - added by garry.yao 6 years ago.
Unit Test Case
3341.patch (537 bytes) - added by garry.yao 6 years ago.
3341_2.patch (495 bytes) - added by fredck 6 years ago.
3341_3.patch (640 bytes) - added by fredck 6 years ago.
3341_4.patch (641 bytes) - added by fredck 6 years ago.

Change History

Changed 6 years ago by garry.yao

Unit Test Case

Changed 6 years ago by garry.yao

comment:1 Changed 6 years ago by garry.yao

  • Status changed from new to assigned
  • Keywords IE Review? added

comment:2 Changed 6 years ago by fredck

  • Status changed from assigned to new
  • Owner changed from garry.yao to fredck
  • Keywords Review- added; Review? removed

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 6 years ago by fredck

comment:3 Changed 6 years ago by fredck

  • Status changed from new to assigned

Changed 6 years ago by fredck

comment:4 Changed 6 years ago by fredck

  • Keywords Review? added; Review- removed

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

comment:5 Changed 6 years ago by alfonsoml

  • 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 6 years ago by fredck

comment:6 Changed 6 years ago by fredck

  • Keywords Review? added; Review- removed

comment:7 Changed 6 years ago by martinkou

  • Keywords Review+ added; Review? removed

comment:8 Changed 6 years ago by fredck

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [3416].

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