From 8977745fe39a85c19eacceb8ce1c7152cb124f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 14 Jan 2023 22:32:00 +0100 Subject: [PATCH] Fixes #44: Two prefixes resolving to the same namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new TreeBuilder addition seems to have fixed this bug. I added the test that was provided in !108 by Oliver Inemar but not the rest of the code. Signed-off-by: Maxime “pep” Buquet --- minidom/src/element.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/minidom/src/element.rs b/minidom/src/element.rs index 6f4d8a16..ab5bb1f5 100644 --- a/minidom/src/element.rs +++ b/minidom/src/element.rs @@ -989,4 +989,20 @@ mod tests { assert_eq!(elem, elem2); } + + #[test] + fn failure_with_duplicate_namespace() { + let elem: Element = r###" + + + + + + + "### + .parse() + .unwrap(); + } }