[markup] Re-escape text on re-insertion
This commit is contained in:
parent
fd9d012f73
commit
547d72270b
|
@ -144,10 +144,13 @@ markup_parse_text(GMarkupParseContext *context __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
markup_parser_data_t *p = (markup_parser_data_t *) user_data;
|
markup_parser_data_t *p = (markup_parser_data_t *) user_data;
|
||||||
ssize_t rlen;
|
ssize_t rlen;
|
||||||
|
char *esc;
|
||||||
|
|
||||||
|
esc = g_markup_escape_text(text, text_len);
|
||||||
|
text_len = a_strlen(esc);
|
||||||
rlen = a_strlen(p->text) + 1 + text_len;
|
rlen = a_strlen(p->text) + 1 + text_len;
|
||||||
p_realloc(&p->text, rlen);
|
p_realloc(&p->text, rlen);
|
||||||
a_strncat(p->text, rlen, text, text_len);
|
a_strncat(p->text, rlen, esc, text_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a markup_parser_data_t structure with elements list.
|
/** Create a markup_parser_data_t structure with elements list.
|
||||||
|
|
Loading…
Reference in New Issue