From dd215282c75e6c27f43734687a8bce3e200a67b0 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 14 Dec 2011 15:11:55 +0000 Subject: [PATCH] Elm entry: Adjust the conversion funcs to use the new tags. SVN revision: 66199 --- legacy/elementary/src/lib/elm_util.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/legacy/elementary/src/lib/elm_util.c b/legacy/elementary/src/lib/elm_util.c index 735da34007..c1dcd3e2ab 100644 --- a/legacy/elementary/src/lib/elm_util.c +++ b/legacy/elementary/src/lib/elm_util.c @@ -60,15 +60,13 @@ _elm_util_mkup_to_text(const char *mkup) { _str_ncpy(ttag, tag_start + 1, tag_end - tag_start - 1); ttag[tag_end - tag_start - 1] = 0; - if (!strcmp(ttag, "br")) + if ((!strcmp(ttag, "br")) || + (!strcmp(ttag, "\n")) || + (!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, "\\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")) + else if ((!strcmp(ttag, "tab")) || + (!strcmp(ttag, "\t")) || + (!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); @@ -179,7 +177,7 @@ _elm_util_text_to_mkup(const char *text) if (ch == '\n') str = _str_append(str, "
", &str_len, &str_alloc); else if (ch == '\t') - str = _str_append(str, "<\t/>", &str_len, &str_alloc); + str = _str_append(str, "", &str_len, &str_alloc); else if (ch == '<') str = _str_append(str, "<", &str_len, &str_alloc); else if (ch == '>')