diff options
-rw-r--r-- | src/xmlfixups.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xmlfixups.cpp b/src/xmlfixups.cpp index 3989a0c..2bb52f8 100644 --- a/src/xmlfixups.cpp +++ b/src/xmlfixups.cpp @@ -631,7 +631,8 @@ void XmlFixups::runPassTwo(const DOM::Document& doc) // all elements in the duplicates list don't need that. while(prev.hasChildNodes()) - el.appendChild(prev.removeChild(prev.getFirstChild())); + el.insertBefore(prev.removeChild(prev.getLastChild()), + el.getFirstChild()); // Remove duplicate node parent.removeChild(prev); |