Ticket #2168 (closed Bug: fixed)

Opened 14 months ago

Last modified 14 months 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 14 months ago.
Proposed SVN patch
2168_2.patch (1.1 KB) - added by alfonsoml 14 months ago.
updated patch

Change History

Changed 14 months ago by alfonsoml

Proposed SVN patch

Changed 14 months ago by alfonsoml

  • keywords Review? added

Changed 14 months 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 14 months ago by alfonsoml

updated patch

Changed 14 months ago by alfonsoml

  • keywords Review? added; Review- removed

I've included both break statements.

Changed 14 months 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

Changed 14 months 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.