svg_loader: fixing parsing empty tags 09/313809/1
authorjoogab.yun <joogab.yun@samsung.com>
Mon, 1 Jul 2024 05:40:37 +0000 (14:40 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Tue, 2 Jul 2024 05:33:09 +0000 (14:33 +0900)
Self-closing tags (empty elements) were parsed until
the appearance of the '>' character, causing the '/'
char to be appended to the tag name. The final '/'
char should be omitted.

Change-Id: Ifd0f61abf588e77598fcd2d57210ef7610f617a9

src/loaders/svg/tvgSvgLoader.cpp

index 7042d5a31e1aa68d64e48d4d3aeb3053ed05e50e..538d9b4bd5cb4cc697503f898bc6410440c62374 100644 (file)
@@ -2700,6 +2700,7 @@ static void _svgLoaderParserXmlOpen(SvgLoaderData* loader, const char* content,
         //Parse the empty tag
         attrs = content;
         while ((attrs != nullptr) && *attrs != '>') attrs++;
+        if (empty) attrs--;
     }
 
     if (attrs) {