Opened 7 years ago

Closed 6 years ago

#4690 closed Bug (fixed)

htmlParser goes wrong with empty inline elements

Reported by: garry.yao Owned by: fredck
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 7 years ago.
4690_2.patch (1.7 KB) - added by garry.yao 7 years ago.
4690_3.patch (2.0 KB) - added by fredck 7 years ago.

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by garry.yao

comment:1 Changed 7 years ago by garry.yao

  • Keywords Confirmed Review? added
  • Milestone set to CKEditor 3.1
  • Owner set to garry.yao
  • Status changed from new to assigned
  • Version set to SVN (CKEditor)

comment:2 Changed 7 years ago by garry.yao

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

comment:3 Changed 7 years ago by fredck

  • Keywords Review+ added; Review? removed

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

comment:4 Changed 7 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 7 years ago by garry.yao

comment:5 Changed 7 years ago by garry.yao

  • Keywords Review? added; Review- removed

Previous patch was closing the pending element in wrong direction.

comment:6 Changed 7 years ago by fredck

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

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

comment:7 Changed 7 years ago by fredck

  • Keywords Review? added; Review- removed
  • Status changed from new to assigned

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

comment:8 Changed 6 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 6 years ago by fredck

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

Fixed with [4622].

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