Bug #14325: set_attribute does not keep '&' in character references
| From: | andrew at boxuk dot com | Date: | Mon, 03 Dec 2001 16:39:38 +0000 |
| Subject: | Bug #14325: set_attribute does not keep '&' in character references | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-72349@lists.php.net to get a copy of this message | ||
From: andrew@boxuk.com
Operating system: Redhat 7.0
PHP version: 4.0.5
PHP Bug Type: DOM XML related
Bug description: set_attribute does not keep '&' in character references
The '&' in character references is converted to & when used in
set_attribute
e.g. ! is changed to !
$oXml = new_xmldoc("1.0");
$oRoot = $oXml->add_root("outputXml");
$oRoot->set_attribute("test","&033;");
print $oXml->dumpmem();
This produces
<?xml version="1.0"?>
<outputXml test="&033;"/>
instead of
<?xml version="1.0"?>
<outputXml test="&033;"/>
PHP modules compiled:
'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs'
'--with-exec-dir=/usr/bin' '--with-config-file-path=/etc/httpd'
'--with-regex=system' '--enable-debugger' '--enable-magic-quotes'
'--enable-sysvshm' '--with-dom' '--enable-force-cgi-redirect'
'--enable-sigchild' '--with-wddx' '--enable-inline-optimization'
'--with-gnu-ld' '--enable-bcmath' '--enable-crypt'
'--with-xml'
'--with-sablot' '--enable-dbg=shared' '--with-dbg-profiler'
--
Edit bug report at: http://bugs.php.net/?id=14325&edit=1