From 533be6581fb7ef2c8002a171c5709c6184c9a4ac Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 18 Jan 2008 20:51:03 +0000 Subject: [PATCH] Escape font name before writing it to fixed buffer. Font names can contain spaces, either in the file name and the fontconfig, so do the escape and keep words linked. Now it's possible to have things like: font=Vera\\ Sans:style=Bold and it will work. (note double \\ is required) SVN revision: 33526 --- legacy/edje/src/lib/edje_textblock_styles.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/legacy/edje/src/lib/edje_textblock_styles.c b/legacy/edje/src/lib/edje_textblock_styles.c index c8c9685f2b..3d7b3f866d 100644 --- a/legacy/edje/src/lib/edje_textblock_styles.c +++ b/legacy/edje/src/lib/edje_textblock_styles.c @@ -440,9 +440,14 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf) /* Add font name last to save evas from multiple loads */ if (tag->font) { + char *tmp; buf = _edje_strbuf_append(buf, " ", &buflen, &bufalloc); buf = _edje_strbuf_append(buf, "font=", &buflen, &bufalloc); - buf = _edje_strbuf_append(buf, tag->font, &buflen, &bufalloc); + tmp = _edje_str_escape(tag->font); + if (tmp) { + buf = _edje_strbuf_append(buf, tmp, &buflen, &bufalloc); + free(tmp); + } } buf = _edje_strbuf_append(buf, "'", &buflen, &bufalloc); }