[cnp_helper] add '&' char to escape char
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Thu, 9 Jun 2011 09:11:02 +0000 (18:11 +0900)
committerHyoyoung Chang <hyoyoung.chang@samsung.com>
Thu, 9 Jun 2011 10:03:22 +0000 (19:03 +0900)
Change-Id: Ie0a66cd6b7fe6930d091d105f50bdd0c5c391c21

src/lib/elm_cnp_helper.c

index 9fbde12..b79f112 100644 (file)
@@ -2085,6 +2085,7 @@ mark_up(const char *start, int inlen, int *lenp)
           {
              if (*p == escapes[i].value)
                {
+                  if (!iscntrl(escapes[i].value)) l++;
                   l += strlen(escapes[i].escape);
                   break;
                }
@@ -2101,6 +2102,7 @@ mark_up(const char *start, int inlen, int *lenp)
           {
              if (*p == escapes[i].value)
                {
+                  if (!iscntrl(escapes[i].value)) *q++ = '&';
                   strcpy(q, escapes[i].escape);
                   q += strlen(escapes[i].escape);
                   p ++;