-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
WordPress lazy-loading noscript cleaner broken with libxml2 < 2.9.9 #240
Comments
At this point I see these possible solutions:
|
There is also a separate bug in tidy that wraps the |
Apparently, html5lib suffers from this even worse, even with j0k3r/php-readability#60. I thought it might use libxml2 internally but it happens on libxml2 2.9.10 as well: $graby = new Graby([
'extractor' => [
'default_parser' => 'html5lib',
'allowed_parsers' => ['html5lib'], // Without this it would still use libxml
]
], new GuzzleAdapter()); |
With libxml2 2.9.4 (included in Ubuntu 18.04 LTS), Graby’s WordPress lazy-loading noscript cleaner is unable to remove the second image in the noscript text:
is turned into:
It works fine with libxml2 2.9.10 in later versions of Ubuntu, it was likely fixed by https://gitlab.gnome.org/GNOME/libxml2/-/commit/35e83488505d501864826125cfe6a7950d6cba78.
You can reproduce this by running
on system with libxml2 before 2.9.9, or if you have Nix:
$ $nix-shell --run 'composer install && php test.php'
See fossar/selfoss#1230 for more details.
The text was updated successfully, but these errors were encountered: