Commit 5280b6c2 authored by jvoisin's avatar jvoisin

Add a test for svg namespace

parent a81ea65d
Pipeline #26012 passed with stages
in 2 minutes and 18 seconds
......@@ -37,7 +37,7 @@ class SVGParser(exiftool.ExiftoolParser):
def get_meta(self) -> Dict[str, Union[str, dict]]:
meta = super().get_meta()
# The namespace is mandatory, but thereis only one bossible.
# The namespace is mandatory, but only the …/2000/svg is valid.
ns = 'http://www.w3.org/2000/svg'
if meta.get('Xmlns', ns) == ns:
meta.pop('Xmlns')
......
This diff is collapsed.
......@@ -885,4 +885,5 @@ class TestCleaning(unittest.TestCase):
os.remove('./tests/data/clean.cleaned.svg')
os.remove('./tests/data/clean.cleaned.cleaned.svg')
p = images.SVGParser('./tests/data/weird.svg')
self.assertEqual(p.get_meta()['Xmlns'], 'http://www.w3.org/1337/svg')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment