Uploaded image for project: 'Hippo Site Toolkit 2'
  1. 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

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.22.00
    • Fix Version/s: 2.22.04, 2.23.01
    • Component/s: None
    • Labels:
      None
    • Similar issues:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: