Opened 17 years ago

Closed 16 years ago

#346 closed Bug (fixed)

blank first line in PRE tag causes newline characters to be removed

Reported by: David Au Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: FCKeditor 2.4.1
Keywords: Confirmed Firefox Cc:


This issue only affects Firefox (tested with

When the first line within a PRE tag is blank, the newline characters in the remaining lines will be removed after clicking on the Source button several times.

  1. To reproduce this issue, paste the following into FCKeditor's Source view:

   * First line (above) is blank.
   * Some more text...
   public void testFunction(){
     System.out.println( "abc" );
  1. Next press the Source button to return to the normal view.
  1. Now press the Source button two more times and you will see that the lines within the PRE tag are mangled due to the missing newline characters.

This ticket may be related to ticket #328.

Change History (4)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Confirmed Firefox added; pre removed

Confirmed with FF2. Ok with IE6.

Without the blank line, line breaks are converted to <br> (as expected with FF, which doesn't mean it is the correct thing). With the blank lines, no <br> are placed there, breaking the code.

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.5

Let's try to fix it for the 2.5. May be delayed if too complex.

comment:3 Changed 16 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

The basic issue here (line breaks being removed), has been solved with [523], which was one of the partial fix I committed for #328. So yes, these tickets are related.

While the appearance is now correct, the <br> tags added are still wrong. A <pre> tag doesn't need <br> tags for line breaks. They shouldn't be added there. I'll look for a fix in this issue.

comment:4 Changed 16 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Ok, the <br> problem is already mentioned in #404. So for this ticket alone it can be considered fixed.

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