Opened 9 years ago

Closed 9 years ago

#346 closed Bug (fixed)

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

Reported by: decinz Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: FCKeditor 2.4.1
Keywords: Confirmed Firefox Cc:

Description

This issue only affects Firefox (tested with 2.0.0.3).

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:
<pre>

  /***
   * First line (above) is blank.
   * Some more text...
   */
   public void testFunction(){
     System.out.println( "abc" );
   }
</pre>
  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 9 years ago by fredck

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

  • Milestone set to FCKeditor 2.5

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

comment:3 Changed 9 years ago by martinkou

  • Owner set to martinkou
  • Status changed from new to assigned

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 9 years ago by martinkou

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

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