Reject QTI items with entity references instead of raising - #6238
Merged
rtibbles merged 1 commit intoSep 30, 2026
Merged
Conversation
rtibblesbot
marked this pull request as ready for review
September 30, 2026 18:45
Contributor
Author
|
Outside this PR's scope — tracked under #5998:
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly How was this generated?
|
Unresolved entity nodes crashed schema validation and Perseus derivation, aborting publish. parse_qti_xml now raises XMLSyntaxError, so validation returns is_valid=False and derivation treats the item as not derivable. Covers validator, sync API and publish. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6234-f6da72
branch
from
September 30, 2026 18:53
c3c0fd3 to
57c0512
Compare
rtibbles
approved these changes
Sep 30, 2026
rtibbles
left a comment
Member
There was a problem hiding this comment.
Changes make sense - and good to see the secure option to not resolve the entities is already set, this is just taking the next step to raise a validation error with them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Entity references (
&e;) crashedvalidate_qti_itemandperseus_derive, aborting publish or 500ing the sync API.parse_qti_xmlraisesXMLSyntaxErroron entity nodes; existing callers already handle it (is_valid=False, not derivable).secure_parserkeepsresolve_entities=False.<!ENTITY>, bare<!DOCTYPE>,&.References
Fixes #6234. Same class as #6229 (comment nodes); reconcile the two
parse_qti_xmlchecks if that lands differently.Reviewer guidance
linenocomes from the entity node.AI usage
Implemented with Claude Code from a written plan, test-first. I reviewed the diff for scope.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-09-30 18:53 UTC