Fix Bug 517064: Make XML well-formed again by properly translating the 5 XML entities

This commit is contained in:
JSCHILL1 2010-02-04 09:30:22 -06:00
parent 6230682a01
commit 6147bb2085
4 changed files with 28 additions and 19 deletions

View file

@ -47,7 +47,7 @@ class ScourOptions:
keep_editor_data = False
strip_xml_prolog = False
indent_type = "space"
viewboxing = False
enable_viewboxing = False
class NoInkscapeElements(unittest.TestCase):
def runTest(self):
@ -983,6 +983,11 @@ class EnsureLineEndings(unittest.TestCase):
self.assertEquals( len(s.splitlines()), 4,
'Did not output line ending character correctly')
class XmlEntities(unittest.TestCase):
def runTest(self):
self.assertEquals( scour.makeWellFormed('<>&"\''), '&lt;&gt;&amp;&quot;&apos;',
'Incorrectly translated XML entities')
# TODO: write tests for --enable-viewboxing
# TODO; write a test for embedding rasters
# TODO: write a test for --disable-embed-rasters