Opened 16 years ago

Closed 11 years ago

#1660 closed Bug (fixed)

<br type="_moz"> and <p>&#160;</p> in empty source

Reported by: sir qwerty Owned by:
Priority: Normal Milestone:
Component: UI : Enter Key Version: FCKeditor 2.5.1
Keywords: FireFox Cc:

Description

When FCKConfig.EnterMode option is explicitly set to BR value, empty textarea right after initialization contains <br type="_moz"> string after switching to source code view.

When FCKConfig.EnterMode option is explicitly set to P value, empty textarea right after initialization contains <p>&#160;</p> string after switching to source code view.

When FCKConfig.EnterMode option is explicitly set to DIV value, empty textarea right after initialization contains <div>&#160;</div> string after switching to source code view.

When FCKConfig.EnterMode option is left to use implicitly set default value (P), nothing appears in source code of empty textarea, which is OK.

Reproduces: Always

Browsers: Mozilla Firefox 2.0.0.11 on Windows XP

Extra: Opera 9.50 shows always &#160; sequence in all three possible FCKConfig.EnterMode options. Internet Explorer 7 is OK.

Change History (14)

comment:1 in reply to:  description Changed 16 years ago by mem

I confirm the bug, with Firefox 2.0.0.11 the empty textarea contains <br type="_moz"> after the page load, with Opera contains &nbsp;

comment:2 Changed 16 years ago by mem

FCKeditor 2.5.1

comment:3 Changed 16 years ago by mem

Firefox quick solution (i don't know if it's the best, but it works)

Open: fckeditor/editor/js/fckeditorcode_gecko.js Row: 48 Find: I='<br type="_moz">';this._BodyHTML=I; Replace with: I=' ';this._BodyHTML=I; Note: Do not place an empty I value (I=), the editor will disappear

comment:4 Changed 16 years ago by sir qwerty

Thanks, I confirm this to be partial workaround at least for initial empty textareas containing no <br type="_moz"> after applying. Unfortunatelly, this tag appears after hitting Enter key several times, last linebreak always appears as <br type="_moz"> (which is not XHTML valid, I'm afraid).

comment:5 Changed 16 years ago by mem

Another step forward: (create a simple <br /> instead of <br type="_moz">)

Open: fckeditor/editor/js/fckeditorcode_gecko.js Row: 36 Find: {var B=A.createElement('br');B.setAttribute('type','_moz');return B;} Delete: B.setAttribute('type','_moz');

If you don't want the final <br /> i suggest you to delete it with a server side script. PHP example: $string = str_replace('<br tyle="_moz" />',,$string);

comment:6 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed FF added

Confirmed in FF: I can only confirm that a <br type="_moz" /> appears when switching to Source View right after launching a site if enter mode is set to br

FCKConfig.EnterMode = 'br' ;

If set to other values ( p or div ) it seems to work fine.

Note: in Opera when Enter Mode is set to br an &nbsp occurs as described above

In IE6 and IE7 everything works fine

comment:7 Changed 16 years ago by Jura

The bug is reproducible on FCKeditor 2.6 beta. But the Milestone is not defined as yet.

comment:8 Changed 16 years ago by Martin Kou

I've proposed a patch for the type="_moz" problem in #1150. I can't reproduce the &#160; problem though.

comment:9 Changed 16 years ago by sir qwerty

The &#160 entity is shown when FCKConfig.EnterMode is set to "DIV" or "P"

AND

FCKConfig.ProcessHTMLEntities = false;

comment:10 Changed 16 years ago by sir qwerty

Version: FCKeditor 2.5FCKeditor 2.6.3 Beta

Although fixed in 2.6.3 beta, FCK editor still forces me to have at least one <br /> in the end of my input text. This is undesired. Suggested workarounds listed above did it perfectly.

comment:11 Changed 15 years ago by Nick

Version: FCKeditor 2.6.3 BetaFCKeditor 2.6.4

I get the added <br type="_moz" /> with 2.6.4

comment:12 Changed 15 years ago by Wiktor Walc

#2154 marked as duplicate.

comment:13 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Version: FCKeditor 2.6.4FCKeditor 2.5.1

Please, don't bump the version where it was reported. If it isn't fixed it's obvious that the problem still exists in the new versions. Following your logic all the bugs should be marked as 2.6.4 (or even SVN), making the version field absolutely useless.

#3217 has been marked as dup.

comment:14 Changed 11 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

This issue expired.

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