Closed nchammas closed 7 months ago
@nchammas, I could reproduce the error (with HTMLProofer 5.0.8) as follows:
htmlproofer --as-links "https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.spark%22%20AND%20v%3A%223.5.0%22"
Not sure HTMLProofer can do much to make this special full URL checkable, since the error is in fact coming from nokogiri.
Still, HTMLProofer would allow you to ignore the parts of the URL that are causing issues with --swap-urls
, e.g.
htmlproofer --swap-urls "search\.maven\.org/#search.*:search.maven.org" --as-links "https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.spark%22%20AND%20v%3A%223.5.0%22"
You find full documentation for this in the README.
Hope this helps
To be precise, the error is caused by HTMLProofer trying to use nokogiri to infer whether #search%7Cga%7C1%7Cg%3A%22org.apache.spark%22%20AND%20v%3A%223.5.0%22
is a valid hash for https://search.maven.org/
.
However, this is not meant to be a content hash but used to provide some query parameters processed via JavaScript, and this is not something HTMLProofer/Nokogiri can do much about.
Therefore, you would need to instruct HTMLProofer that this is not a hash to be checked, which is indeed what --swap-urls
above would do by stripping #search...
Closing this issue
On this page is the following link:
Checking this with a locally built version of that page yields the following error:
I assume this should be handled more gracefully somehow since the link does appear to be valid HTML and works for me in Safari.
For reference, the full trace is: