note 126798 added to domdocument.createattribute

From: Date: Mon, 24 Jan 2022 15:00:00 +0000
Subject: note 126798 added to domdocument.createattribute
Groups: php.notes 
Request: Send a blank email to php-notes+get-217541@lists.php.net to get a copy of this message
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 ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 178.17.2.163) ---- Manual Page -- https://php.net/manual/en/domdocument.createattribute.php Edit -- https://main.php.net/note/edit/126798 Del: integrated -- https://main.php.net/note/delete/126798/integrated Del: useless -- https://main.php.net/note/delete/126798/useless Del: bad code -- https://main.php.net/note/delete/126798/bad+code Del: spam -- https://main.php.net/note/delete/126798/spam Del: non-english -- https://main.php.net/note/delete/126798/non-english Del: in docs -- https://main.php.net/note/delete/126798/in+docs Del: other reasons-- https://main.php.net/note/delete/126798 Reject -- https://main.php.net/note/reject/126798 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217541) next »