|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29837 disable-output-escaping = "yes", ignored
Submitted: 2004-08-25 16:37 UTC Modified: 2004-12-14 12:18 UTC
Avg. Score:4.9 ± 0.3
Reproduced:9 of 9 (100.0%)
Same Version:6 (66.7%)
Same OS:6 (66.7%)
From: tetsuo at scriptsphp dot org Assigned:
Status: Closed Package: XSLT related
PHP Version: 5.0.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tetsuo at scriptsphp dot org
New email:
PHP Version: OS:


 [2004-08-25 16:37 UTC] tetsuo at scriptsphp dot org
CDATA sections in XSL templates
that are enclosed
in <xsl:text disable-output-escaping="yes"> give output
that IS escaped but shouldn't be.

I've been testing the transformation with xsltproc and
everything behaves correctly.

libxslt Version 	1.1.6 
libxslt compiled against libxml Version 	2.6.9

Reproduce code:

Expected result:
... &nbsp; ...

Actual result:
... &amp;nbsp; ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-27 09:27 UTC]
I'll try to have a look at it, when my time permits...
 [2004-09-06 15:53 UTC] plumber at gnu-darwin dot org
this example like other produces a seg fault

new XsltProcessor

php 5.0.1-darwin

libxslt Version 
libxslt compiled against libxml Version 
libexslt Version 1.1.8
 [2004-10-12 18:45 UTC] gantonet at free dot fr
Same problem with PHP 5.0.2 version for Windows
Here's what I get from phpinfo()

PHP API  20031224  
PHP Extension  20040412  
Zend Extension  220040412  

XML Support  active  
XML Namespace Support  active  
libxml2 Version  2.6.11  

XSL  enabled  
libxslt Version  1.1.7  
libxslt compiled against libxml Version  2.6.11  
EXSLT  enabled  
libexslt Version  0.8.5
 [2004-12-14 12:18 UTC]
First off, your reproduce scripts dont work under xsltproc - latest libml/libxslt (undefined entities - nbsp). Anways...

A new parameter has been added for PHP 5.1 (in CVS now) for loading documents. You would need to load your xsl sheets and use a CDATA node:
<xsl:text disable-output-escaping='yes'><![CDATA[A&nbsp;&nbsp;&nbsp;a]]></xsl:text> by:
$xsl->load( $xslfile, LIBXML_NOCDATA); as the CDATA must be internally converted to TEXT nodes for the disable-output-escaping to work (xsltproc does this automatically for stylesheets).

For 5.0.x you will need to do a workaround using:
<xsl:text disable-output-escaping='yes'>A&amp;nbsp;&amp;nbsp;&amp;nbsp;a</xsl:text>

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 19:03:14 2022 UTC