Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-222

Using Xalan XSLT processor with disable-output-escaping="yes" and the new XHTML serializer will result in JAXP processing instruction with escaped content

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.1.5, 2.0.0 M3
    • 1.1.3, 1.1.4, 2.0.0 M3
    • Kernel
    • None

      If we have:

      <div>
        <xsl:value-of select="'<p>contenu</p>'" disable-output-escaping="yes"/>
      </div>
      

      the following fragment will be produced by xalan (but it's JAXP compliant):

      <div>
        <?javax.xml.transform.disable-output-escaping ?>&lt;p&gt;mon contenu&lt;/p&gt;<?javax.xml.transform.enable-output-escaping ?>
      </div>
      

      But, the tricky part is that it was hidden because we used xalan from beginning to end which unescape content in the serializer.

      So, the solution is to write content inside these processing instructions directly into the output stream (pass through mode) and to filter processing instructions.

          [RUNTIME-222] Using Xalan XSLT processor with disable-output-escaping="yes" and the new XHTML serializer will result in JAXP processing instruction with escaped content

          Cédric Damioli made changes -
          Workflow Original: jira [ 11175 ] New: Ametys [ 12879 ]
          Julien Couret (Inactive) made changes -
          Project Import New: Thu May 28 17:04:11 UTC 2009 [ 1243530251015 ]
          Cédric Damioli made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Cédric Damioli made changes -
          Fix Version/s New: 2.0.0 [ 11008 ]
          Fix Version/s Original: 1.2.0 [ 10641 ]
          Affects Version/s Original: 1.2.0 [ 10641 ]
          Affects Version/s New: 2.0.0 [ 11008 ]
          Sébastien Launay (Inactive) made changes -
          Fix Version/s New: 1.2.0 [ 10641 ]
          Fix Version/s New: 1.1.5 [ 11461 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Sébastien Launay (Inactive) made changes -
          Summary Original: Using Xalan transform with disable-output-escaping="yes" and the new XHTML serializer will result in xalan processing instruction with escaped content New: Using Xalan XSLT processor with disable-output-escaping="yes" and the new XHTML serializer will result in JAXP processing instruction with escaped content
          Sébastien Launay (Inactive) made changes -
          Description Original: If we have:
          {code:xml}
          <div>
            <xsl:value-of select="'<p>contenu</p>'" disable-output-escaping="yes"/>
          </div>
          {code}
          the following fragment will be produced by *xalan* (but it's JAXP compliant):
          {code:xml}
          <div>
            <?javax.xml.transform.disable-output-escaping ?>&lt;p&gt;mon contenu&lt;/p&gt;<?javax.xml.transform.enable-output-escaping ?>
          </div>
          {code}

          But, the tricky part is that it was hidden because we used xalan from beginning to end which unescape content in the serializer.

          So, the solution is to write content inside these processing instructions directly into the output stream (pass trough mode) and to filter processing instructions.
          New: If we have:
          {code:xml}
          <div>
            <xsl:value-of select="'<p>contenu</p>'" disable-output-escaping="yes"/>
          </div>
          {code}
          the following fragment will be produced by *xalan* (but it's JAXP compliant):
          {code:xml}
          <div>
            <?javax.xml.transform.disable-output-escaping ?>&lt;p&gt;mon contenu&lt;/p&gt;<?javax.xml.transform.enable-output-escaping ?>
          </div>
          {code}

          But, the tricky part is that it was hidden because we used xalan from beginning to end which unescape content in the serializer.

          So, the solution is to write content inside these processing instructions directly into the output stream (pass through mode) and to filter processing instructions.
          Sébastien Launay (Inactive) created issue -

            yabon Sébastien Launay (Inactive)
            yabon Sébastien Launay (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: