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

Fix cloning attributes to use setAttributeNode to fix #859 #889

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

Conversation

gijsk
Copy link
Contributor

@gijsk gijsk commented Jul 1, 2024

No description provided.

@@ -0,0 +1,12 @@
<div id="readability-page-1" class="page">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually very good, but it addresses the invalid markup breaking us entirely.

@gijsk
Copy link
Contributor Author

gijsk commented Jul 1, 2024

I don't love this - #509 fixed a similar issue by just using a try...catch; The other code that is now hitting the same problem doesn't have a try...catch. I could be convinced that just adding that try...catch is better than using setAttributeNode, especially given the context from #509 and the responses that those tickets on jsdom and the DOM spec have received ("don't do that"), and the fact that the attributes aren't actually used so we might as well lose them...

@fchasen
Copy link

fchasen commented Aug 8, 2024

@gijsk This has some conflicts now, but otherwise seems ready to merge.

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.

2 participants