I was going to reopen http://drupal.org/node/1098586 but I think this might be a bit different.
Like #17 in that issue I am finding my content injected with unnecessary markup.

I can use the editor to add some nice lists headings etc.... save the node, then go to edit again, this time when I [switch to rich text editor] all the previous clean markup is injected with tons of extra br tags stuck into it, if saved the resulting ul's li's etc are all blown out and over spaced as you would expect. You have to either clean all of them out manually or be certain not to use ckeditor beyond the first time. This didn't happen before upgrading - I was on an older 6.x-1.x-dev

One other thing is this is only happening on a cck text input field but not on the body field...
its a standard multi-line cck text field with Text processing as "Filtered text (user selects input format)"
my site default format is Full-Html, I dont have any filters enabled for my Full-Html input format
& ckeditor is off by default with the Switch To links option enabled

ckeditor is the only thing that could be causing this im pretty sure, especially being it happens when clicking [Switch to rich text editor.]

Anyone else see this in their setup?

Comments

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

I think this is done by ckeditorLinebreakConvert which convert end line "\n" to "br" , but it should not working when you have some html input like "p, div, br, etc" . Please paste us text that you have in CKEditor (source mode) before saving and when you edit (after you turn CKEditor - switch to reach text editor). Second alfo from source mode.

Macronomicus’s picture

Ok... strange but I think I figured it out, I copied and pasted the html output into a text editor & removed all whitespace and linebreaks making a single line then pasted it back in.... went through the process I mentioned above saved and came back switching on/off the rich text editor... seemed to do the trick... apparently there was some invisible cruft that ckeditorLinebreakConvert was picking up on in my text.

Still im not sure how that cruft got in there to begin with, ill post back here if it happens again and/or I have more info.

Cheers!

Frogtown’s picture

I can confirm this in 6.x-1.6

Our users were reporting that break tags 'br' tags were being placed in lists, and I checked it out.

It is only breaking in IE -- have tested in ie8 and ie9 and replicated it in both circumstances.

I've seen it only on nodes where there are solely header tags and list tags (I have seen the same behavior on both ol and ul lists)

I took this test code:

<h2>Will it break?</h2>
<ul>
<li>Maybe</li>
<li>Yes</li>
<li>Who knows</li>
<li>No</li>
</ul>

When switching from code view it gets reformatted to:

<h2>
	Will it break?</h2>
<ul>
	<li>
		Maybe</li>
	<li>
		Yes</li>
	<li>
		Who knows</li>
	<li>
		No</li>
</ul>

No big issue there. However, upon saving the node, the page presents with spaces between list items. Going back into edit form the code has become:

<p>&nbsp;</p>
<h2>
	<br />
	Will it break?</h2>
<br />
<ul>
	<br />
	<li>
		<br />
		Maybe</li>
	<br />
	<li>
		<br />
		Yes</li>
	<br />
	<li>
		<br />
		Who knows</li>
	<br />
	<li>
		<br />
		No<br />
		&nbsp;</li>
</ul>
<br />
<p>&nbsp;</p>

This is only happening in internet explorer it seems. However, when I do something like put a paragraph tag with just 'hello' or whatever in it at the beginning and end of the text it will not break. As well, if I insert 'div' tags before and after the lists, it does not break.

There is something about just having an isolated list that CKEditor seems to over-correct since it's not wrapped in something else.

I tried the method in the post above as well. Stripped out the endlines from the text. Put the text all on one line. Retype it myself into plain text editor, but the results eventually end up the same.

matalo’s picture

Did you get to the bottom of this? I have the same issue with CKEditor 3.6.4 on a standalone site without Drupal.