Ticket #1660 (new Bug)

Opened 19 months ago

Last modified 8 weeks ago

<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: Confirmed FF 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

in reply to: ↑ description   Changed 18 months 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;

  Changed 18 months ago by mem

FCKeditor 2.5.1

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

  Changed 18 months 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).

  Changed 18 months 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);

  Changed 17 months ago by w.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

  Changed 16 months ago by Jura

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

  Changed 13 months ago by martinkou

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

  Changed 13 months ago by sir_qwerty

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

AND

FCKConfig.ProcessHTMLEntities = false;

  Changed 11 months ago by sir_qwerty

  • version changed from FCKeditor 2.5 to FCKeditor 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.

  Changed 5 months ago by nmiller

  • version changed from FCKeditor 2.6.3 Beta to FCKeditor 2.6.4

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

  Changed 5 months ago by wwalc

#2154 marked as duplicate.

  Changed 8 weeks ago by alfonsoml

  • version changed from FCKeditor 2.6.4 to FCKeditor 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.

Note: See TracTickets for help on using tickets.