Skip to content

ext/tidy: using tidyParseString when available instead for tidy::pars… #19093

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devnexen
Copy link
Member

…eString().

@devnexen devnexen force-pushed the tidy_parse_string_upd branch from 265f1f4 to 729b8d7 Compare July 10, 2025 22:51
@devnexen devnexen marked this pull request as ready for review July 10, 2025 23:39
@@ -809,9 +807,15 @@ static zend_result php_tidy_parse_string(PHPTidyObj *obj, const char *string, ui

obj->ptdoc->initialized = true;

#ifdef HAVE_TIDYPARSESTRING
if (tidyParseString(obj->ptdoc->doc, string) < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://3v4l.org/KMN1s (edit the repro slightly, as tidy ext is available for live/wasm preview only)

I guess this will stop parsing on the first null byte. Currently explicit length is honored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants