Opened 17 years ago
Closed 16 years ago
#1150 closed Bug (fixed)
<br type="_moz" /> appearing in Source mode
Reported by: | Martin Kou | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6.3 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed Firefox Opera Safari Review+ | Cc: |
Description
Reproduction Procedure:
- Go to sample12.html
- Change Enter mode to BR
- Ctrl-A, Delete in the document to delete everything
- Type "line1" <Enter>
- Type "line2" <Enter>
- Type "line3" <Enter>
- Switch to Source mode
- Switch back to WYSIWYG mode
- Go to the end of the document, press Enter
- Switch to Source mode
- Now the last line of the HTML code reads "<br type="_moz" />".. which shouldn't happen.
The issue can be reproduced on Opera, Firefox and Safari
Attachments (1)
Change History (19)
comment:1 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I have downloaded the version 2.5 (30 novembre 2007) and I still see this bug (I have followed the Reproduction procedure).
Thank you and best regards.
Antonio
comment:3 Changed 17 years ago by
I am using Firefox (Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11)
comment:4 Changed 17 years ago by
FCKeditor 2.5.1
After the page load, all empty textareas contain <br type="_moz"> in Firefox 2.0.0.11, and in Opera
comment:5 Changed 17 years ago by
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:6 Changed 17 years ago by
this seems to originate in _source/classes/fckeditingarea.js line:80 ========= / If nothing in the body, place a BOGUS tag so the cursor will appear.
FCKRegexLib.EmptyParagraph.test( sBody ) ) ) |
sBody = '<br type="_moz">' ; =========
wich seems to en in the compacted fckeditor.js at line 48 like Mem in the previous reply mentioned.
his quick solution seems to work, but at the cost of getting focus in the edit window. (the   remains there tho)
comment:8 Changed 17 years ago by
I have been able to reproduce this bug in both Firefox, and oddly enough in IE7 when using the list control. If you hit enter twice to leave the list in either browser, <br type="_moz" /> is tacked on in the last line in source view.
comment:9 Changed 16 years ago by
An other way to get this <br type="_moz" /> (using FF and FCK 2.6 with EnterMode: p) :
1/ Type line1 and <Enter> a few times (to generate some paragraphs")
2/ Type line2
3/ Select all and make the text bold
Here is the output when looking with source view :
<p><strong> line1<br /></strong></p>
<p><strong><br type="_moz" /></strong></p>
<p><strong><br type="_moz" /></strong></p>
<p><strong>line2<br type="_moz" /></strong></p>
Changed 16 years ago by
Attachment: | 1150.patch added |
---|
comment:10 Changed 16 years ago by
Keywords: | Review? added |
---|
The <br> tag itself should be harmless - both the one that got appended towards the end of document, and the one that got inserted inside empty block tags (it was actually added there to prevent the block tag from becoming invisible in editor mode). The problem is the type="_moz" attribute.
I'm proposing a patch to properly remove such attribute values from the source code.
comment:11 Changed 16 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | reopened → new |
comment:12 Changed 16 years ago by
Status: | new → assigned |
---|
comment:13 Changed 16 years ago by
Patch keeps the type="_moz" attribute from surfacing for me. However, it seems like it would be appropriate to remove the entire tag, at least when it's truly bogus, and that does not happen. Should it just return false even if there is no nextSibling, perhaps, or is more complex logic needed? Certainly if it's at the end of the document and it's bogus, it should be removed. Not as big a deal as what the patch already addresses, though.
comment:14 follow-up: 15 Changed 16 years ago by
Patch doesn't works for me on FF3 and FF2. When EnterMode is 'p', then '<p> </p>' appears in source mode, and '<br type="_moz" />' appears, when EnterMode='br'.
comment:15 Changed 16 years ago by
Sorry for my post. I haven't used the fcksource=true url parameter. Now it inserts only <br/ >
comment:16 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:17 Changed 16 years ago by
Milestone: | → FCKeditor 2.6.3 |
---|
comment:18 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [2219].
Click here for more info about our SVN system.
Fixed with [755].
Click here for more info about our SVN system.