diff --git a/scour/scour.py b/scour/scour.py index 5e9aaf0..430cfa1 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -2752,7 +2752,10 @@ def remapNamespacePrefix(node, oldprefix, newprefix): def makeWellFormed(str): - xml_ents = { '<':'<', '>':'>', '&':'&', "'":''', '"':'"'} + # Don't escape quotation marks for now as they are fine in text nodes + # as well as in attributes if used reciprocally + # xml_ents = { '<':'<', '>':'>', '&':'&', "'":''', '"':'"'} + xml_ents = { '<':'<', '>':'>', '&':'&'} # starr = [] # for c in str: diff --git a/testscour.py b/testscour.py index 06eaf49..322b7f9 100755 --- a/testscour.py +++ b/testscour.py @@ -1114,7 +1114,7 @@ class EnsureLineEndings(unittest.TestCase): class XmlEntities(unittest.TestCase): def runTest(self): - self.assertEqual( scour.makeWellFormed('<>&"\''), '<>&"'', + self.assertEqual( scour.makeWellFormed('<>&'), '<>&', 'Incorrectly translated XML entities') class DoNotStripCommentsOutsideOfRoot(unittest.TestCase):