Ticket #2168 (closed Bug: fixed)

Opened 6 years ago

Last modified 4 years ago

Comments shouldn't create new blocks

Reported by: alfonsoml Owned by: alfonsoml
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

2168.patch (1.1 KB) - added by alfonsoml 6 years ago.
Proposed SVN patch
2168_2.patch (1.1 KB) - added by alfonsoml 6 years ago.
updated patch

Change History

Changed 6 years ago by alfonsoml

Proposed SVN patch

comment:1 Changed 6 years ago by alfonsoml

  • Keywords Review? added

comment:2 Changed 6 years ago by fredck

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

updated patch

comment:3 Changed 6 years ago by alfonsoml

  • Keywords Review? added; Review- removed

I've included both break statements.

comment:4 Changed 6 years ago by fredck

  • Keywords Review+ added; Review? removed
  • Milestone set to 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 6 years ago by alfonsoml

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

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy