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

Prevent Readability.js from removing the <html> element if it has a class attribute with specific values #307

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

Conversation

WetHat
Copy link

@WetHat WetHat commented Mar 27, 2024

For web pages which have a HTML root tag with a class attribute whose value matches the removal criteria of Readability.js

  • the pageTitle is undefined
  • baseURI point to chrome-extension://nghfdnngoejlhedogdpikdlkmdfoojii/_generated_background_page.html rather than the actual web page
  • local links are incorrect

The problem is that Readability.ls removes the <html> root tag, as a consequence, uses the wrong urls. Also, Markdownload loses access to the page meta-data.

This pull request fixes issue #260 by removing the class attribute from the <html> root tag.

Following sites mentioned in issue #260 work correctly with this fix:

Note: This does not fix issue #201 !

attribute which matches removal criteria. Removal of the HTML element
causies Markdownload to fail because:
* the pageTitle is undefined
* basicUri point to chrome-extension://nghfdnngoejlhedogdpikdlkmdfoojii/_generated_background_page.html
  rather than the actual web page
* all local links are incorrect
@WetHat WetHat mentioned this pull request Mar 27, 2024
@WetHat WetHat changed the title Prevent Readability from removing the <html> element if it has a class attribute with specific values Prevent Readability.js from removing the <html> element if it has a class attribute with specific values Mar 28, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant