Opened 17 years ago
Closed 17 years ago
#2780 closed Bug (duplicate)
Protected elements are being outputted without closing tags.
| Reported by: | Martin Kou | Owned by: | Martin Kou |
|---|---|---|---|
| Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 3.0 |
| Component: | General | Version: | SVN (FCKeditor) - Retired |
| Keywords: | Review- | Cc: |
Description
Run the following code in Firebug, with replacebyclass.html sample opened:
var editor = CKEDITOR.instances.editor1;
var o = new CKEDITOR.dom.element('object', editor.document);
o.append(new CKEDITOR.dom.element('embed', editor.document));
var i = editor.fakeobjects.protectElement(o);
editor.document.getBody().append(i);
An object with an embed tag inside is inserted to the document. Now switch to Source mode. The HTML output reads like this:
<p> This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p> <object><embed></object>
Note the <embed> tag doesn't have a closing tag, and it's not self closing.
Attachments (1)
Change History (5)
Changed 17 years ago by
| Attachment: | 2780.patch added |
|---|
comment:1 Changed 17 years ago by
| Keywords: | Review? added |
|---|
comment:2 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
After some discussion with Fred, it shouldn't be required to add embed to dtd.js for it to appear - that's a bug in the htmldataprocessor plugin. So instead of hacking dtd.js, a fix for htmldataprocessor is required.
comment:3 Changed 17 years ago by
Ok, so how to protect EMBED element?
This code:
var a= editor.document.createElement( 'embed' ); editor.fakeobjects.protectElement( a );
doesn't work.
comment:4 Changed 17 years ago by
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
This is a dup of #2860, which is already fixed.

Not sure if it's ok to modify the dtd.js for this purpose.