Skip to content

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 7, 2015

…encoding

Assigning to DOMNode::textContent encodes entities, what does not match the
behavior of DOMText::__construct() and DOMDocument::createTextNode. This patch
changes the behavior of DOMNode::textContent in this regard.

IMO the former behavior is a bug, but changing the behavior would constitute a BC break (there may be code working around the issue), so perhaps it would be best to apply the patch for PHP 7 only.

…encoding

Assigning to DOMNode::textContent encodes entities, what does not match the
behavior of DOMText::__construct() and DOMDocument::createTextNode. This patch
changes the behavior of DOMNode::textContent in this regard.
@staabm
Copy link
Contributor

staabm commented Jul 7, 2015

If it is only merged into php7 the BC break should be noted somewhere.

@cmb69
Copy link
Member Author

cmb69 commented Jul 15, 2015

@staabm

If it is only merged into php7 the BC break should be noted somewhere.

ACK. UPGRADING seems to be appropriate. (The php.net manual is supposed to be updated accordingly.)

@smalyshev smalyshev added the Bug label Jul 25, 2015
@cmb69
Copy link
Member Author

cmb69 commented Jul 29, 2015

On further consideration I'd prefer to fix the bug for PHP 5.6 as well. The entity escaping simply doesn't make sense, and that should be fixed as soon as possible.

@php-pulls
Copy link

Comment on behalf of cmb at php.net:

Applied.

@php-pulls php-pulls closed this Sep 4, 2015
@cmb69 cmb69 deleted the domnode-textcontent branch September 4, 2015 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants