svg_loader: group tags misinterpreted as parent nodes

Group tags in a format <tag .../> finds no application
to the rest of the svg file and should be skipped.
This commit is contained in:
Mira Grudzinska 2022-01-18 23:59:14 +01:00 committed by Hermet Park
parent 0c6c37b616
commit 922e3e10c0

View file

@ -2539,6 +2539,7 @@ static void _svgLoaderParserXmlOpen(SvgLoaderData* loader, const char* content,
if ((method = _findGroupFactory(tagName))) { if ((method = _findGroupFactory(tagName))) {
//Group //Group
if (empty) return;
if (!loader->doc) { if (!loader->doc) {
if (strcmp(tagName, "svg")) return; //Not a valid svg document if (strcmp(tagName, "svg")) return; //Not a valid svg document
node = method(loader, nullptr, attrs, attrsLength); node = method(loader, nullptr, attrs, attrsLength);