Skip to content
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

libxml2 2.9.13 changes recovery mode #371

Closed
kcphila opened this issue Aug 12, 2022 · 1 comment
Closed

libxml2 2.9.13 changes recovery mode #371

kcphila opened this issue Aug 12, 2022 · 1 comment

Comments

@kcphila
Copy link

kcphila commented Aug 12, 2022

This is more of a note on html processing, in case you are not aware.

libxml2 v2.9.13, which is the newest release that gets pulled in by apt on Ubuntu 22.04, changes how the "recovery" mode works for html rendering.

Since xml2 is used by many other packages (like kableExtra and modelsummary), this may end up being a repeated issue. See the following code:

xml2::read_html("* pval < 0.05; ** pval < 0.01")

For systems that have libxml2 v.2.9.12 or before installed, the output is as expected:

{html_document}
<html>
[1] <body><p>* pval &lt; 0.05; ** pval &lt; 0.01</p></body>

For systems that have libxml2 v.2.9.13 installed, it's truncated at the first less than sign:

{html_document}
<html>
[1] <body><p>* pval </p></body>

This is a result of the upstream devs reducing recovery mode processing to avoid DDoS attacks and generally simplify processing. They also indicate in the issue linked below that this functionality is likely to continue. There's an argument to say that xml2, like libxml2, should just be concerned with processes "correct" html/xml and users should not rely on consistent recovery mode or error handling, but this also seems like a change that will affect a lot of folks doing statistics.

https://gitlab.gnome.org/GNOME/libxml2/-/issues/339

@hadley
Copy link
Member

hadley commented Oct 30, 2023

Thanks for the update; since I haven't heard any complaints about this in the 18 months since you filed an issue, it sounds like we got lucky and this doesn't affect much real world code.

@hadley hadley closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants