Don't escape quotes ('/") in text nodes and attributes. (#64)
- In text nodes quotes are fine - In attributes quotes are fine if used reciprocally. Escaping in the latter case often causes issues, e.g. with quoted font names (#21) or inline CSS styles (#56), while it probably does not gain anything (if quotes are wrongly used in attribute names the XML is most likely invalid to start with)
This commit is contained in:
parent
fe2884c3e8
commit
57f93efc89
2 changed files with 5 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue