[elm_entry] Filter_accept callback should consider meaningless tag and should not...
authorWooHyun Jung <wh0705.jung@samsung.com>
Mon, 6 May 2013 11:56:20 +0000 (20:56 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:50:42 +0000 (13:50 +0900)
src/lib/elm_entry.c

index 3d3342f..807abba 100644 (file)
@@ -4964,13 +4964,20 @@ elm_entry_filter_accept_set(void *data,
                   if (read_char == ';')
                     {
                        char *tag;
+                       int utf8;
                        tag = malloc(read_idx - last_read_idx + 1);
                        if (tag)
                          {
                             strncpy(tag, (*text) + last_read_idx, read_idx - last_read_idx);
-                            tag[read_idx - last_read_idx] = 0;
-                            read_char = *(elm_entry_markup_to_utf8(tag));
+                            tag[read_idx - last_read_idx] = 0;                            
+                            utf8 = *(elm_entry_markup_to_utf8(tag));
                             free(tag);
+                            if (!utf8)
+                              {
+                                 in_set = EINA_FALSE;
+                                 goto inserting;
+                              }
+                            read_char = utf8;
                          }
                     }
                }