mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-15 20:59:32 +03:00
parser: Always throw entity errors if external DTD is loaded
When parsing with XML_PARSE_DTDLOAD, missing entities are always an
error.
Also consolidate behavior when validating. See b717abdd
.
This commit is contained in:
@ -101,7 +101,7 @@ run_test(desc="Loading entity with custom callback",
|
||||
exp_status="loaded", exp_err=[
|
||||
( 3, 'failed to load "http://example.com/dtds/sample.dtd": Attempt to load network entity\n'),
|
||||
( -1, "Attempt to load network entity: http://example.com/dtds/sample.dtd"),
|
||||
( 3, "Entity 'sample.entity' not defined\n")
|
||||
( 4, "Entity 'sample.entity' not defined\n")
|
||||
])
|
||||
|
||||
# Register a catalog (also accessible via pystr://) and retry
|
||||
@ -114,7 +114,7 @@ run_test(desc="Loading entity and unregistering callback",
|
||||
test_callback=lambda: libxml2.popInputCallbacks(),
|
||||
exp_status="loaded", exp_err=[
|
||||
( 3, "failed to load \"py://strings/dtds/sample.dtd\": No such file or directory\n"),
|
||||
( 3, "Entity 'sample.entity' not defined\n")
|
||||
( 4, "Entity 'sample.entity' not defined\n")
|
||||
])
|
||||
|
||||
# Try to load the document again
|
||||
|
Reference in New Issue
Block a user