Skip to content

Add defensive Element check in HeadSnapshot.detailsByOuterHTML #1520

Open
Danish-Belal wants to merge 1 commit intohotwired:mainfrom
Danish-Belal:fix-headsnapshot-hasattribute-defensive-1472
Open

Add defensive Element check in HeadSnapshot.detailsByOuterHTML #1520
Danish-Belal wants to merge 1 commit intohotwired:mainfrom
Danish-Belal:fix-headsnapshot-hasattribute-defensive-1472

Conversation

@Danish-Belal
Copy link
Copy Markdown

Filter out non-Element nodes before calling elementWithoutNonce. Text/comment nodes in head lack hasAttribute(), causing TypeError during prefetch when head contains HTML comments.

…otwired#1472)

Filter out non-Element nodes before calling elementWithoutNonce.
Text/comment nodes in head lack hasAttribute(), causing TypeError
during prefetch when head contains HTML comments.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant