fix tb style value parsing issue with escapes.

SVN revision: 78859
This commit is contained in:
Carsten Haitzler 2012-11-02 12:27:39 +00:00
parent 6ba18e57d2
commit 98ce0b7076
3 changed files with 40 additions and 2 deletions

View File

@ -1141,3 +1141,7 @@
* Fix clip bug while computing coordinates for Evas GL
direct rendering optimization.
2012-11-02 Carsten Haitzler (The Rasterman)
* Fix evas textblock tag parser to respect escaped spaces and
escaped single quotes. This fixes an edje text class restyling bug.

View File

@ -1,5 +1,11 @@
Evas 1.8.0
Changes since Evas 1.7.1
-------------------------
Fixes:
* Fix evas textblock tag parser to respect escaped spaces and escaped single quotes
Changes since Evas 1.7.0:
-------------------------

View File

@ -1684,20 +1684,48 @@ _format_param_parse(const char *item, const char **key, const char **val)
{
start = quote + 1;
end = strchr(start, '\'');
while ((end) && (end > start) && (end[-1] == '\\'))
end = strchr(end + 1, '\'');
}
else
{
end = strchr(start, ' ');
while ((end) && (end > start) && (end[-1] == '\\'))
end = strchr(end + 1, ' ');
}
/* Null terminate before the spaces */
if (end)
{
*val = eina_stringshare_add_length(start, end - start);
char *tmp = alloca(end - start + 1);
char *s, *d;
for (d = tmp, s = (char *)start; s < end; s++)
{
if (*s != '\\')
{
*d = *s;
d++;
}
}
*d = 0;
*val = eina_stringshare_add(tmp);
}
else
{
*val = eina_stringshare_add(start);
char *tmp = alloca(strlen(start) + 1);
char *s, *d;
for (d = tmp, s = (char *)start; *s; s++)
{
if (*s != '\\')
{
*d = *s;
d++;
}
}
*d = 0;
*val = eina_stringshare_add(tmp);
}
}