svg_loader: Fix invaild '<' nested check

When Type is DOCTYPE, Child Entities start with '<'.
This condition is valid when general Elements (svg, g, path etc) are used.
Add a Doctype check to if condition.
(There can be various cases related to '<' nested case.
But for now, I only add Doctype considering the side effect.)
This commit is contained in:
JunsuChoi 2022-05-04 10:23:20 +09:00 committed by Hermet Park
parent 1336e611c4
commit 0d010bdb6a

View file

@ -388,7 +388,7 @@ bool simpleXmlParse(const char* buf, unsigned bufLength, bool strip, simpleXMLCb
if (p) {
//Invalid case: '<' nested
if (*p == '<') return false;
if (*p == '<' && type != SimpleXMLType::Doctype) return false;
const char *start, *end;
start = itr + 1 + toff;