Opened 13 years ago

Closed 13 years ago

#7755 closed Bug (wontfix)

WYSIWYG: missing closing body tag in generated HTML

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


Closing body tag is missing for both full page mode and non-full page mode in the generated HTML that is loaded in the iframe.

CK version : 3.5.3

Change History (10)

comment:1 Changed 13 years ago by Jakub Ś

Status: newpending

Could you explain in more detail what exactly do you mean? Perhaps provide us with a test case and sample file?

comment:2 Changed 13 years ago by Arne

Yes, I can.

In the Wysiwyg plugin, in the loadData method, a call is made to create the iframe with the data to load.

createIFrame( data );

The data sent to the createIFrame method doesn't not include a closing body tag.

comment:3 Changed 13 years ago by Jakub Ś

So far I did not manage to reproduce it.

Could you tell me one more thing - in what situation are you getting this error?
Is it when you load CKEditor , add or remove iframe from it or you are loading CKEditor with iframe within it? What are the exact steps to reproduce the issue?

comment:4 Changed 13 years ago by Arne

If you replace the expression

createIFrame( data );

in the wysiwyg plugin file with

createIFrame( data );

you will see that the HTML produced has no closing body tag.

The current code does not produce an error for us, because the browser fixes the HTML, but it is nontheless invalid HTML that gets inserted into the iframe.

comment:5 Changed 13 years ago by Jakub Ś

Status: pendingconfirmed
Version: 3.1
  1. In replacebycode sample change script to ckeditor_source.js
  2. Load replace by code sample (It's best to do it in FF)
  3. In Firebug, scripts tab, choose \_source\plugins\wysiwygarea\plugin.js
  4. Go to line 1024 and put a break point (code: createIFrame( data );)
  5. Examine object data. you will see that it ids missing closing body tag.

This has occured for the first time in CKEditor 3.1

comment:6 Changed 13 years ago by Frederico Caldeira Knabben

Status: confirmedpending

@arne, can you please exemplify the problem that this issue is causing you?

comment:7 Changed 13 years ago by Arne

As stated in my previous comment, there are no known errors that I am aware of regarding this. The browser closes the tag, but I thought I should bring it to your attention that the HTML injected into the iframe is in fact invalid HTML.

comment:8 Changed 13 years ago by Alfonso Martínez de Lizarrondo

It isn't invalid HTML, the closing tag for the body element is optional (everybody can understand that when the document finishes the body is closed):

In fact even the start tag is optional, look here:

comment:9 Changed 13 years ago by Arne

Using the default CKEditor Doctype specified in the config.js file, W3C validator does not validate the following HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

comment:10 Changed 13 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: pendingclosed

Ok gentlemen... the data loaded in the editor iframe is instrumental and is not aimed to be validated. The important thing here is the data outputted by the editor.

We don't need to change this. I think it's intentional, just to have less code.

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