mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-17 00:04:18 +00:00
fix(xfa): initialize stripping parser options completely
This commit is contained in:
1 file changed
+1
-1
@@ -151,7 +151,7 @@ pub fn strip(doc: &mut Document) -> Result<Stripped, XfaError> {
|
||||
}
|
||||
// One XDP: the packets it holds are the envelope's children.
|
||||
let text = s.decoded_within(64 << 20).ok().and_then(|b| crate::packets::decode(&b)).map(|(t, _)| t).unwrap_or_default();
|
||||
let opts = crate::xml::ParsingOptions { allow_dtd: false, nodes_limit: 1_000_000, ..Default::default() };
|
||||
let opts = crate::xml::ParsingOptions { allow_dtd: false, nodes_limit: 1_000_000 };
|
||||
if crate::xml_nesting_depth(&text) <= crate::MAX_XML_DEPTH
|
||||
&& let Ok(parsed) = crate::xml::Document::parse_with_options(&text, opts)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user