Opened 16 years ago

Closed 16 years ago

Last modified 14 years ago

#2168 closed Bug (fixed)

Comments shouldn't create new blocks

Reported by: Alfonso Martínez de Lizarrondo Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone: FCKeditor 2.6.1
Component: Core : Output Data Version: FCKeditor 2.5
Keywords: Review+ Cc:

Description

When the body is fixed to make sure that everything is properly nested, the comment nodes should be treated specially so they don't generate a new block.

given this input:

This is <!-- some comment --> some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.

with enter mode set to P, if you switch to design and back to source the output is

<p>This is</p>
<!-- some comment -->
<p>some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>

the paragraph has been broken

it should have been left as

<p>This is <!-- some comment --> some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>

Attachments (2)

2168.patch (1.1 KB) - added by Alfonso Martínez de Lizarrondo 16 years ago.
Proposed SVN patch
2168_2.patch (1.1 KB) - added by Alfonso Martínez de Lizarrondo 16 years ago.
updated patch

Download all attachments as: .zip

Change History (7)

Changed 16 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2168.patch added

Proposed SVN patch

comment:1 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

The fix is almost ok... it's missing a "break" for "case 3", otherwise it will fell down into the introduced "case 8" code.

Changed 16 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2168_2.patch added

updated patch

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added; Review- removed

I've included both break statements.

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed
Milestone: FCKeditor 2.6.1

The second is not needed actually... but it is not a problem too, other than extra 6B :P

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

Resolution: fixed
Status: newclosed

The last break is useful because if someone does like me and starts writing without remembering the logic of javascript then it will make again this mistake :)

Fixed with [1984]

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy