svg_loader: key and value in the simpleXmlParseW3CAttribute needed to be cleared out of spaces

This commit is contained in:
Mira Grudzinska 2021-06-17 01:30:45 +02:00 committed by JunsuChoi
parent 7ffeb2e606
commit 2bf21dae3d

View file

@ -503,6 +503,10 @@ bool simpleXmlParseW3CAttribute(const char* buf, simpleXMLAttributeCb func, cons
}
if (key[0]) {
key = const_cast<char*>(_simpleXmlSkipWhiteSpace(key, key + strlen(key)));
key[_simpleXmlUnskipWhiteSpace(key + strlen(key) , key) - key] = '\0';
val = const_cast<char*>(_simpleXmlSkipWhiteSpace(val, val + strlen(val)));
val[_simpleXmlUnskipWhiteSpace(val + strlen(val) , val) - val] = '\0';
#ifdef THORVG_LOG_ENABLED
if (!func((void*)data, key, val)) {