@@ -3288,6 +3288,7 @@ static void _svgLoaderParserXmlClose(SvgLoaderData* loader, const char* content,
32883288 for (unsigned int i = 0 ; i < sizeof (graphicsTags) / sizeof (graphicsTags[0 ]); i++) {
32893289 if (!strncmp (tagName, graphicsTags[i].tag , sz)) {
32903290 loader->currentGraphicsNode = nullptr ;
3291+ if (!strncmp (tagName, " text" , 4 )) loader->openedTag = OpenedTagType::Other;
32913292 loader->stack .pop ();
32923293 break ;
32933294 }
@@ -3361,11 +3362,9 @@ static void _svgLoaderParserXmlOpen(SvgLoaderData* loader, const char* content,
33613362 node = method (loader, parent, attrs, attrsLength, simpleXmlParseAttributes);
33623363 if (node && !empty) {
33633364 if (!strcmp (tagName, " text" )) loader->openedTag = OpenedTagType::Text;
3364- else {
3365- auto defs = _createDefsNode (loader, nullptr , nullptr , 0 , nullptr );
3366- loader->stack .push (defs);
3367- loader->currentGraphicsNode = node;
3368- }
3365+ auto defs = _createDefsNode (loader, nullptr , nullptr , 0 , nullptr );
3366+ loader->stack .push (defs);
3367+ loader->currentGraphicsNode = node;
33693368 }
33703369 } else if ((gradientMethod = _findGradientFactory (tagName))) {
33713370 SvgStyleGradient* gradient;
@@ -3403,7 +3402,6 @@ static void _svgLoaderParserText(SvgLoaderData* loader, const char* content, uns
34033402 auto text = &loader->svgParse ->node ->node .text ;
34043403 if (text->text ) free (text->text );
34053404 text->text = strDuplicate (content, length);
3406- loader->openedTag = OpenedTagType::Other;
34073405}
34083406
34093407
0 commit comments