Opened 8 years ago

Closed 8 years ago

#4690 closed Bug (fixed)

htmlParser goes wrong with empty inline elements

Reported by: Garry Yao Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.1
Component: Core : Output Data Version: SVN (CKEditor) - OLD
Keywords: Confirmed Review+ Cc:

Description

Having htmlParser deal with the following input:

<span><span></span>text</span>

With incorrectly yield:

text

Attachments (3)

4690.patch (731 bytes) - added by Garry Yao 8 years ago.
4690_2.patch (1.7 KB) - added by Garry Yao 8 years ago.
4690_3.patch (2.0 KB) - added by Frederico Caldeira Knabben 8 years ago.

Download all attachments as: .zip

Change History (12)

Changed 8 years ago by Garry Yao

Attachment: 4690.patch added

comment:1 Changed 8 years ago by Garry Yao

Keywords: Confirmed Review? added
Milestone: CKEditor 3.1
Owner: set to Garry Yao
Status: newassigned
Version: SVN (CKEditor)

comment:2 Changed 8 years ago by Garry Yao

Ticket Test added at :
http://ckeditor.t/tt/4690/1.html.

comment:3 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

Definitely makes sense. You may fix the comment to "a pending tag".

comment:4 Changed 8 years ago by Garry Yao

Keywords: Review- added; Review+ removed

R- for failing the following TC:

assert.areSame( '<span class="outer">text</span>', htmlParse( '<span class="outer"><span></span>text</span>' ) );

Changed 8 years ago by Garry Yao

Attachment: 4690_2.patch added

comment:5 Changed 8 years ago by Garry Yao

Keywords: Review? added; Review- removed

Previous patch was closing the pending element in wrong direction.

comment:6 Changed 8 years ago by Frederico Caldeira Knabben

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

I've just found out that the code just needs to be simplified to make it work. I'll come with a new patch for it.

Changed 8 years ago by Frederico Caldeira Knabben

Attachment: 4690_3.patch added

comment:7 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Status: newassigned

The pending list must be the first thing to get checked when closing a tag.

comment:8 Changed 8 years ago by Garry Yao

Keywords: Review+ added; Review? removed

That's a perfect fix, plz mark the ticket TC as stable after fixed.

comment:9 Changed 8 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [4622].

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