From 39364393f49d141f628b96b6d94041fb1bac6200 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 28 Apr 2008 16:47:23 +0200 Subject: [PATCH] [markup] Escape text on reconstruct Signed-off-by: Julien Danjou --- common/markup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/markup.c b/common/markup.c index a666c9a6c..ab703a7ea 100644 --- a/common/markup.c +++ b/common/markup.c @@ -144,11 +144,13 @@ markup_parse_text(GMarkupParseContext *context __attribute__ ((unused)), { markup_parser_data_t *p = (markup_parser_data_t *) user_data; ssize_t len, rlen; + char *esctext; len = a_strlen(p->text); rlen = len + 1 + text_len; p_realloc(&p->text, rlen); - a_strncat(p->text, rlen, text, text_len); + esctext = g_markup_escape_text(text, text_len); + a_strncat(p->text, rlen, esctext, a_strlen(esctext)); } /** Create a markup_parser_data_t structure with elements list.