forked from enlightenment/efl
eina/simple_xml_parser: don't parse the <, > in the attribute string.
The tag identifier should not be inside of the string "~". Previous logic doesn't care that scenario, the parser context can be corrupted and it will be no more useful. @fix
This commit is contained in:
parent
ca0e51a2c6
commit
d72aa3fecb
|
@ -136,9 +136,16 @@ _eina_simple_xml_tag_start_find(const char *itr, const char *itr_end)
|
||||||
static inline const char *
|
static inline const char *
|
||||||
_eina_simple_xml_tag_end_find(const char *itr, const char *itr_end)
|
_eina_simple_xml_tag_end_find(const char *itr, const char *itr_end)
|
||||||
{
|
{
|
||||||
|
Eina_Bool inside_quote = EINA_FALSE;
|
||||||
for (; itr < itr_end; itr++)
|
for (; itr < itr_end; itr++)
|
||||||
|
{
|
||||||
|
if (*itr == '"') inside_quote = !inside_quote;
|
||||||
|
if (!inside_quote)
|
||||||
|
{
|
||||||
if ((*itr == '>') || (*itr == '<')) /* consider < also ends a tag */
|
if ((*itr == '>') || (*itr == '<')) /* consider < also ends a tag */
|
||||||
return itr;
|
return itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue