Opened 11 years ago

Closed 11 years ago

#2331 closed Bug (wontfix)

Content of <script> tags is not wrapped in <![CDATA[...]]>

Reported by: A.M. Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.6.2
Keywords: Cc:

Description

FCKeditor is supposed to output XHTML, but it fails to wrap content of <script> and <style> tags in CDATA sections. This is how a <script> tag should be generated in XHTML:

    <script type="text/javascript">
    <![CDATA[
    var a = "This is a line break: <br/>";
    ]]>
    </script>

See the XHTML specification for details:

http://www.w3.org/TR/xhtml1/#h-4.8

Lack of CDATA sections screws up any XSLT transformations performed against the generated XHTML.

Change History (1)

comment:1 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Keywords: XHTML CDATA script removed
Resolution: wontfix
Status: newclosed

FCKeditor doesn't create by itself the script or style tags, it must be done with a plugin or directly in source mode. In any case it would be the responsibility of the author to put those tags if his backend system does require them.

That specs points out that the suggested method is to use external scripts and stylesheets: http://www.w3.org/TR/xhtml1/#C_4

The only way to do it in FCKeditor would be to run a regexp against the contents of those nodes (every time that the content is serialized), I think that it's far from ideal and prone to errors.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy