Description
The following code:
<?php
$node = new DOMAttr('foo','bar');
$node->nodeValue = 'xx1yy';
var_dump($node->nodeValue);
Resulted in this output:
But I expected this output instead:
As shown above, setter of nodeValue unescapes character references.
Because of this, I need to do the following:
$node->nodeValue = htmlspecialchars("xx1yy");
var_dump($node->nodeValue);
This outputs xx1yy. The setter should not unescape character references.
PHP Version
PHP 7.4.3
Operating System
Ubuntu 20.04
Description
The following code:
Resulted in this output:
But I expected this output instead:
As shown above, setter of
nodeValueunescapes character references.Because of this, I need to do the following:
This outputs
xx1yy. The setter should not unescape character references.PHP Version
PHP 7.4.3
Operating System
Ubuntu 20.04