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

XMLWordPrintable

    • 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.

            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: