Migrate csarven:fix/script-textcontent-parsing to linkeddata repository
Migrates the fix from PR #693 (csarven's fork) into the main repository to resolve #692.
Change
Prevents parsing empty script tags in RDFa documents by checking content length before invoking the parser:
// reference/fetcher-classes.js, line 116
- if (Parsable[contentType]) {
+ if (Parsable[contentType] && scripts[i].textContent.trim().length) {
rdfParse(scripts[i].textContent, kb, xhr.original.uri, contentType)
}
Fixes errors when encountering <script type="text/turtle" src="..."></script> tags with no body content.
Next Steps
Maintainer action needed: rename this branch to fix/script-textcontent-parsing or create it from this branch:
git fetch origin copilot/move-script-textcontent-parsing
git checkout -b fix/script-textcontent-parsing FETCH_HEAD
git push origin fix/script-textcontent-parsing
Or alternatively:
git fetch origin
git checkout -b fix/script-textcontent-parsing origin/copilot/move-script-textcontent-parsing
git push origin fix/script-textcontent-parsing
This allows PR #693 to point to linkeddata:fix/script-textcontent-parsing instead of the fork.
> [!WARNING] > >
Original prompt
I want to move csarven:fix/script-textcontent-parsing to a new fix/script-textcontent-parsing. How can I do that
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.