note 126798 rejected from domdocument.createattribute by girgias
| From: | girgias@php.net | Date: | Mon, 24 Jan 2022 15:17:56 +0000 |
| Subject: | note 126798 rejected from domdocument.createattribute by girgias | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-217542@lists.php.net to get a copy of this message | ||
Note Submitter: rmaslo at archa dot cz
----
Code:
<?php
$domAttribute = $domDocument->createAttribute('formaction');
$domAttribute->value = '?Action=Dialog&Dialog=Settings';
?>
It does not give the expected result for me. In $domAttribute->value is empty string.
Code:
<?php
$domAttribute = $domDocument->createAttribute('formaction');
$domAttribute->value = htmlspecialchars('?Action=Dialog&Dialog=Settings');
?>
Is ok.
I don't know if it's an implementation bug or a PHP feature.
PHP Version: 5.6.40-57+0~20211119.60