Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1619

The JSP tag writeHeadContribution [ xhtml = true ] does not set the proper CDATA tags for text/html

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.22.00
    • 2.22.04, 2.23.01
    • None
    • None

    Description

      When using the JSP tag writeHeadContribution with xhtml=true, the CDATA tags which are written are correct for pages served as XML (#1), but wrong for page served as text/html (#2).
      But the second option is mainly used, because it enables a better compatibility across browsers.

      ----------

      #1. For a XHTML page served as XML (text/xml, application/xml, application/xhtml+xml), it must be:

      <script type="text/javascript">
      <![CDATA[
      script code
      ]]>
      </script>

      #2. For a XHTML page served as text/html, the CDATA tags must be:

      <script type="text/javascript">
      //<![CDATA[
      script code
      //]]>
      </script>

      Attachments

        Activity

          People

            wko Woonsan Ko (Inactive)
            mtricot Mickaël Tricot (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: