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

Preserve custom element tags #951

Open
ras0q opened this issue Jan 23, 2025 · 0 comments · May be fixed by #952
Open

Preserve custom element tags #951

ras0q opened this issue Jan 23, 2025 · 0 comments · May be fixed by #952

Comments

@ras0q
Copy link

ras0q commented Jan 23, 2025

The Readability parser currently does not preserve custom element tags such as <my-custom-tag> during the parsing process. These custom tags are stripped out, which can result in the loss of important semantic information and custom function

Desired Feature

Add an option to specify tag names which should be preserved during the parsing.

var article = new Readability(document, {
  tagsToPreserve: ["my-custom-tag", "another-tag"],
}).parse();
@ras0q ras0q changed the title Preserve custom elements Preserve custom element tags Jan 23, 2025
ras0q added a commit to ras0q/readability that referenced this issue Jan 23, 2025
@ras0q ras0q linked a pull request Jan 23, 2025 that will close this issue
ras0q added a commit to ras0q/readability that referenced this issue Jan 23, 2025
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 a pull request may close this issue.

1 participant