When pasted 2 line text, <br> tag shown issue fix 82/119282/4
authorShilpa Singh <shilpa.singh@samsung.com>
Mon, 20 Feb 2017 12:02:00 +0000 (17:32 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 17 Mar 2017 00:31:23 +0000 (17:31 -0700)
as unnecessary conversion happened on a markup text.
conversion should be done only if plain text mode is set.

Change-Id: I66ff0ab191cab4d35df8600cccc381bf88a89c97

src/lib/elm_entry.c

index 3775ff371e43f8dd4268862ec5735a14d48338b4..ad54bc2adc7e237bf05efb06d7d45d70b872a790 100644 (file)
@@ -1654,12 +1654,8 @@ _selection_data_cb(void *data EINA_UNUSED,
         snprintf(entry_tag, len + 1, tag_string, buf);
         _edje_entry_user_insert(obj, entry_tag);
      }
-   else if ((sel_data->format & ELM_SEL_FORMAT_MARKUP) &&
-            (sd->cnp_mode != ELM_CNP_MODE_PLAINTEXT))
-     {
-        _edje_entry_user_insert(obj, buf);
-     }
-   else
+   //TIZEN_ONLY(20170220): If plain text mode only then convert
+   else if (sd->cnp_mode == ELM_CNP_MODE_PLAINTEXT)
      {
         char *txt = _elm_util_text_to_mkup(buf);
         if (txt)
@@ -1672,6 +1668,11 @@ _selection_data_cb(void *data EINA_UNUSED,
              ERR("Failed to convert text to markup text!");
           }
      }
+   else
+     {
+        _edje_entry_user_insert(obj, buf);
+     }
+   //
    free(buf);
    return EINA_TRUE;
 }