summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-11-02 12:27:39 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-11-02 12:27:39 +0000
commit98ce0b7076bdb60859dd888d0575e113c71f1e98 (patch)
tree5e4f192c44a3b7cee13f3c128f20aee9c83b674b /legacy/evas/src/lib
parent6ba18e57d2439c73482f1c4e19f179a159a47991 (diff)
fix tb style value parsing issue with escapes.
SVN revision: 78859
Diffstat (limited to 'legacy/evas/src/lib')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c
index 2775e75..a9c0acc 100644
--- a/legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c
@@ -1684,20 +1684,48 @@ _format_param_parse(const char *item, const char **key, const char **val)
1684 { 1684 {
1685 start = quote + 1; 1685 start = quote + 1;
1686 end = strchr(start, '\''); 1686 end = strchr(start, '\'');
1687 while ((end) && (end > start) && (end[-1] == '\\'))
1688 end = strchr(end + 1, '\'');
1687 } 1689 }
1688 else 1690 else
1689 { 1691 {
1690 end = strchr(start, ' '); 1692 end = strchr(start, ' ');
1693 while ((end) && (end > start) && (end[-1] == '\\'))
1694 end = strchr(end + 1, ' ');
1691 } 1695 }
1692 1696
1693 /* Null terminate before the spaces */ 1697 /* Null terminate before the spaces */
1694 if (end) 1698 if (end)
1695 { 1699 {
1696 *val = eina_stringshare_add_length(start, end - start); 1700 char *tmp = alloca(end - start + 1);
1701 char *s, *d;
1702
1703 for (d = tmp, s = (char *)start; s < end; s++)
1704 {
1705 if (*s != '\\')
1706 {
1707 *d = *s;
1708 d++;
1709 }
1710 }
1711 *d = 0;
1712 *val = eina_stringshare_add(tmp);
1697 } 1713 }
1698 else 1714 else
1699 { 1715 {
1700 *val = eina_stringshare_add(start); 1716 char *tmp = alloca(strlen(start) + 1);
1717 char *s, *d;
1718
1719 for (d = tmp, s = (char *)start; *s; s++)
1720 {
1721 if (*s != '\\')
1722 {
1723 *d = *s;
1724 d++;
1725 }
1726 }
1727 *d = 0;
1728 *val = eina_stringshare_add(tmp);
1701 } 1729 }
1702} 1730}
1703 1731