#2807 closed New Feature (wontfix)
Fatal error when using content-type: application/xhtml+xml
Reported by: | Dmitri Ponomarjov | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Review- CantFix | Cc: |
Description
Steps to reproduce:
- Use "content-type: application/xhtml+xml" in HTTP response headers.
- Initialise FCKEditor using the following Javascript code:
<script type="text/javascript"> var oFCKeditor = new FCKeditor('content'); oFCKeditor.BasePath = "../externals/fckeditor/"; oFCKeditor.Value = ; oFCKeditor.Create(); </script> Result: FCKEditor is not started. The following error message can be seen in FireBug extension for Firefox.
uncaught exception: Operation is not supported (NS_ERROR_DOM_NOT_SUPPORTED_ERR) [Break on this error] document.write( this.CreateHtml() ) ; fckeditor.js (line 67)
This problem is not appearing if 'content-type: text/html' is used in HTTP headers.
This problem has been reproduced on the following software: OS: Windows XP SP3 Eng Browsers: Firefox 3.0.5, Google Chrome 1.0.154.43, Safari 3.1.1 (525.17), Opera 9.63
Attachments (2)
Change History (9)
Changed 16 years ago by
comment:1 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Yes, arczi is right - the problem is caused by unability to use the document.write() method for XHTML applications. Why not to fix FCKEditor::Create() method instead of using the workaround with FCKEditor::CreateHTML() for an everyday situation? document.write is clearly not the optimal long-term solution for the modern web, so this should be at least replaced with innerHTML for the browsers capable of innerHTML operations.
comment:3 Changed 16 years ago by
Type: | Bug → New Feature |
---|
Is it possible to detect content-type with javascript?
Changed 16 years ago by
Attachment: | 2807.patch added |
---|
comment:5 follow-up: 6 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
Injecting the code inside a span looks like a very bad solution, you should use a div. Also, IMHO, it's better to use the sample that you have created xhtml.php, after all almost no one is using xhtml+xml.
The code inside the editor does use iframes, document.write, and document.contentEditable, those are invalid under XHTML, so I doubt that changing the fckeditor.js is enough in order to get full xhtml+xml compatibility.
comment:6 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Replying to alfonsoml:
The code inside the editor does use iframes, document.write, and document.contentEditable, those are invalid under XHTML, so I doubt that changing the fckeditor.js is enough in order to get full xhtml+xml compatibility.
We can't fix it. Editor is based on document.contentEditable and iframes.
comment:7 Changed 16 years ago by
Keywords: | CantFix added |
---|
W3c says:
I attached a sample solution using innerHTML, but you can also use other methods.