|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2015-07-06 15:09 UTC] cmb@php.net
[2015-07-06 21:04 UTC] requinix@php.net
-Status: Open
+Status: Verified
[2015-07-06 21:04 UTC] requinix@php.net
[2015-07-07 13:18 UTC] cmb@php.net
-Summary: overwrite DOMElement textContent properties with
trimming
+Summary: Assigning to DOMNode::textContent does additional
entity encoding
[2015-07-07 13:18 UTC] cmb@php.net
[2015-09-04 23:36 UTC] cmb@php.net
[2015-09-04 23:36 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2015-09-04 23:38 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2015-09-04 23:38 UTC] cmb@php.net
[2015-09-15 12:13 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
Description: ------------ Version : PHP 5.6.10-1~dotdeb+7.3 (cli) (built: Jun 15 2015 07:22:09) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies DomNode::textContent is readonly on the php doc http://php.net/manual/en/class.domnode.php#domnode.props.textcontent. As excepted on php5.4.42, the script returns the good result. But on php5.6, the textContent is not readonly and I don't know why PHP does some HTML entity encoding (that's weird) instead of emitting an error or a warning. Test script: --------------- $element = new DOMText(" Summary for Test DOMText & with a nbsp char right here ."); var_dump($element->textContent); $element->textContent = ltrim(" Summary for Test DOMText & with a nbsp char right here ."); var_dump($element->textContent); Expected result: ---------------- string(92) " Summary for Test DOMText & with a nbsp char right here ." string(92) " Summary for Test DOMText & with a nbsp char right here ." Actual result: -------------- string(92) " Summary for Test DOMText & with a nbsp char right here ." string(69) "Summary for Test DOMText & with a nbsp char right here .".