Skip to content

Fix #80268: loadHTML() truncates at NUL bytes #6368

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

Closed
wants to merge 4 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 22, 2020

libxml2 has no issues parsing HTML strings with NUL bytes; these are
just ignored. Particularly, ::loadHTMLFile() already supports NUL
bytes, so ::loadHTML() should as well.

libxml2 has no issues parsing HTML strings with NUL bytes; these are
just ignored.  Particularly, `::loadHTMLFile()` already supports NUL
bytes, so `::loadHTML()` should as well.
@cmb69 cmb69 added the Bug label Oct 22, 2020
cmb69 added 2 commits October 22, 2020 17:44
Actually, libxml does not replace NUL bytes with spaces, but rather
truncates text content at NUL bytes, but generally continues parsing.
Anyhow, `loadHTML()` and `loadHTMLFile()` should behave the same in
this regard.
@php-pulls php-pulls closed this in 6d2bc72 Oct 26, 2020
@cmb69 cmb69 deleted the cmb/80268 branch October 26, 2020 12:16
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.

2 participants