summaryrefslogtreecommitdiff
path: root/src/xmlfixups.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlfixups.cpp')
-rw-r--r--src/xmlfixups.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xmlfixups.cpp b/src/xmlfixups.cpp
index 45fa59a..3b56f6b 100644
--- a/src/xmlfixups.cpp
+++ b/src/xmlfixups.cpp
@@ -75,7 +75,7 @@ XmlFixups::XmlFixups()
{
loadStringSet(m_duplicates, kNoDuplicates);
loadStringSet(m_removes, kRemoveTags);
- loadStringSet(m_removes, kRemoveEmpty);
+ loadStringSet(m_removeEmpty, kRemoveEmpty);
loadStringSet(m_requireAttrs, kRequireAttrs);
loadStringSet(m_consolidateStart, kConsolidateStart);
loadStringSet(m_consolidateEnd, kConsolidateEnd);
@@ -511,7 +511,7 @@ void XmlFixups::runPassTwo(const DOM::Document& doc)
if(font != NULL)
el.setAttribute(kAtName, font.getAttribute(kAtName));
- font.removeAttribute(kAtId);
+ el.removeAttribute(kAtId);
}
}
@@ -545,7 +545,7 @@ void XmlFixups::runPassTwo(const DOM::Document& doc)
// Tags that get removed but contents preserved. Also here are
// tags that get removed if they have no attributes
if(m_removes.find(name) != m_removes.end() ||
- (m_requireAttrs.find(name) != m_requireAttrs.end() && el.hasAttributes()))
+ (m_requireAttrs.find(name) != m_requireAttrs.end() && !el.hasAttributes()))
{
DOM::Node parent = el->getParentNode();
@@ -569,7 +569,7 @@ void XmlFixups::runPassTwo(const DOM::Document& doc)
}
// Tags that get removed when no child nodes exist
- if(m_removeEmpty.find(name) != m_removeEmpty.end() && el.hasChildNodes())
+ if(m_removeEmpty.find(name) != m_removeEmpty.end() && !el.hasChildNodes())
{
DOM::Node parent = el->getParentNode();