-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOMAttr unescapes character reference #8388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm on the phone so I can't verify, but I don't think this has anything to do with DOMAttr but rather just the fact that var_dump doesn't escape its output and thus the browser converts it. Edit: Also note that PHP 7.4 is unsupported. |
No. I'm testing it on CLI.
|
Bug confirmed https://3v4l.org/Xf27Y , given that |
Writing the
Our implementation does not escape, though. Reading the
Changing this would cause a pretty serious BC break. |
I think this qualifies as bug, but due to the BC break when we fix it, I'm reluctant to do this. @beberlei, thoughts? |
Fixed via GH-10132. |
Do you think it needs a changelog table entry in the manual? |
Yes. This should happen for us by the docs maintainers because there's an UPGRADING entry. But I opened PR php/doc-en#2520 already so it will certainly not be forgotten. |
Reverted the fix because of quite big BC breaks. See #11469 |
This is fixed in the new opt-in spec-compliance mode, which was merged in #13031. |
Uh oh!
There was an error while loading. Please reload this page.
Description
The following code:
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:
This outputs
xx1yy
. The setter should not unescape character references.PHP Version
PHP 7.4.3
Operating System
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: