Opened 13 years ago

Last modified 12 years ago

#8189 confirmed Bug

Empty [link] tag causes content and structure loss

Reported by: spgard Owned by:
Priority: Normal Milestone:
Component: General Version: 3.1
Keywords: Cc:

Description

In the demo or nightly demo, go into source view, delete existing HTML, and paste in the following:

<table> <tr> <td> Left cell</td> <td> <p>First paragraph.</p> <p>Second paragraph, with an empty link tag in it <link />.</p> <p>Third paragraph.</p> </td> <td>Right cell</td> </tr> </table>

Switch to WYSIWYG view. The table, row, and cells are gone, as is the content for the left cell and the first 2 paragraphs of the center cell. I've gotten this result on the latest versions of Opera, Firefox, Chrome, IE, and Safari (all on Windows).

This is skeleton HTML for what we've seen from several of our clients. The empty <link /> tag is the problem - everything is fine if you remove that. I know that shouldn't be there but we have clients who are getting it by copying and pasting content from web pages that already have it in them. One source of this content was Up!CMS. Browsers correctly handle the empty link tag, but CKEditor goes a bit nuts with it.

Change History (2)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.1

The code provided by user:

<table><tr><td>Left cell</td><td> <p>First paragraph.</p> <p>Second paragraph, with an empty link tag in it <link />.</p><p>Third paragraph.</p> </td> <td>Right cell</td> </tr> </table> 

Produces, when switching from Source to WYSIWYG, the following HTML:
From version 3.1 till 3.5.3 rev [6628]:

<link />
<p>
	Third paragraph.</p>
<p>
	.</p>
<table>
	<tbody>
		<tr>
			<td>
				Left cell</td>
			<td>
				<p>
					First paragraph.</p>
				<p>
					Second paragraph, with an empty link tag in it</p>
			</td>
			<td>
				Right cell</td>
		</tr>
	</tbody>
</table>

From version 3.5.3 rev [6629]:

<p>
	&nbsp;</p>
<p>
	<link />
	.</p>
<p>
	Third paragraph.</p>
<p>
	Right cell</p>

Issue is reproducible in all browsers.
I have also tried to use this code in page which has set contenteditable to true but it was working fine there.

comment:2 Changed 12 years ago by Jakub Ś

Other tickets where this revision is mentioned: #9186, #8551, #8481, #9006.

Last edited 12 years ago by Jakub Ś (previous) (diff)
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