- ttag = malloc(tag_end - tag_start);
- if (ttag)
- {
- _str_ncpy(ttag, tag_start + 1, tag_end - tag_start - 1);
- ttag[tag_end - tag_start - 1] = 0;
- if (!strcmp(ttag, "br"))
- str = _str_append(str, "\n", &str_len, &str_alloc);
- else if (!strcmp(ttag, "\n"))
- str = _str_append(str, "\n", &str_len, &str_alloc);
- else if (!strcmp(ttag, "\\n"))
- str = _str_append(str, "\n", &str_len, &str_alloc);
- else if (!strcmp(ttag, "\t"))
- str = _str_append(str, "\t", &str_len, &str_alloc);
- else if (!strcmp(ttag, "\\t"))
- str = _str_append(str, "\t", &str_len, &str_alloc);
- else if (!strcmp(ttag, "ps")) /* Unicode paragraph separator */
- str = _str_append(str, "\xE2\x80\xA9", &str_len, &str_alloc);
- free(ttag);
- }
- tag_start = tag_end = NULL;
- }
- else if (esc_end)
- {
- ts = malloc(esc_end - esc_start + 1);
- if (ts)
- {
- const char *esc;
- _str_ncpy(ts, esc_start, esc_end - esc_start);
- ts[esc_end - esc_start] = 0;
- esc = evas_textblock_escape_string_get(ts);
- if (esc)
- str = _str_append(str, esc, &str_len, &str_alloc);
- free(ts);
- }
- esc_start = esc_end = NULL;
- }
- else if ((!*p) && (s))
- {
- ts = malloc(p - s + 1);
- if (ts)
- {
- _str_ncpy(ts, s, p - s);
- ts[p - s] = 0;
- str = _str_append(str, ts, &str_len, &str_alloc);
- free(ts);
- }
+ ttag = malloc(tag_end - tag_start);
+ if (ttag)
+ {
+ _str_ncpy(ttag, tag_start + 1, tag_end - tag_start - 1);
+ ttag[tag_end - tag_start - 1] = 0;
+ if (!strcmp(ttag, "br"))
+ str = _str_append(str, "\n", &str_len, &str_alloc);
+ else if (!strcmp(ttag, "\n"))
+ str = _str_append(str, "\n", &str_len, &str_alloc);
+ else if (!strcmp(ttag, "\\n"))
+ str = _str_append(str, "\n", &str_len, &str_alloc);
+ else if (!strcmp(ttag, "\t"))
+ str = _str_append(str, "\t", &str_len, &str_alloc);
+ else if (!strcmp(ttag, "\\t"))
+ str = _str_append(str, "\t", &str_len, &str_alloc);
+ else if (!strcmp(ttag, "ps")) /* Unicode paragraph separator */
+ str = _str_append(str, "\xE2\x80\xA9", &str_len, &str_alloc);
+ free(ttag);
+ }
+ tag_start = tag_end = NULL;
+ }
+ else if (esc_end)
+ {
+ ts = malloc(esc_end - esc_start + 1);
+ if (ts)
+ {
+ const char *esc;
+ _str_ncpy(ts, esc_start, esc_end - esc_start);
+ ts[esc_end - esc_start] = 0;
+ esc = evas_textblock_escape_string_get(ts);
+ if (esc)
+ str = _str_append(str, esc, &str_len, &str_alloc);
+ free(ts);
+ }
+ esc_start = esc_end = NULL;
+ }
+ else if ((!*p) && (s))
+ {
+ ts = malloc(p - s + 1);
+ if (ts)
+ {
+ _str_ncpy(ts, s, p - s);
+ ts[p - s] = 0;
+ str = _str_append(str, ts, &str_len, &str_alloc);
+ free(ts);
+ }