From 9582e8013d6dc3bdb4dea910eaac25c108599fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Fri, 21 Dec 2018 02:05:11 +0100 Subject: [PATCH] ignore symbols in svg import --- src/c3nav/mapdata/management/commands/importsvg.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/c3nav/mapdata/management/commands/importsvg.py b/src/c3nav/mapdata/management/commands/importsvg.py index 1549df08..e2845981 100644 --- a/src/c3nav/mapdata/management/commands/importsvg.py +++ b/src/c3nav/mapdata/management/commands/importsvg.py @@ -161,6 +161,10 @@ class Command(BaseCommand): for clippath in element.findall('./svg:clipPath', namespaces): element.remove(clippath) + for element in svg.findall('.//svg:symbol/..', namespaces): + for clippath in element.findall('./svg:symbol', namespaces): + element.remove(clippath) + if svg.findall('.//*[@transform]'): raise CommandError(_('svg contains transform attributes. Use inkscape apply transforms.'))