entry: fix html type paste issue 26/309626/2 accepted/tizen/unified/20240430.020609 accepted/tizen/unified/toolchain/20240507.011931 accepted/tizen/unified/x/20240430.094834
authorBowon Ryu <bowon.ryu@samsung.com>
Sat, 13 Apr 2024 16:53:03 +0000 (01:53 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Sun, 14 Apr 2024 03:38:43 +0000 (12:38 +0900)
When pasting html type into an entry,
all tags are removed and only plain text is displayed in the entry.

Change-Id: I5b1c18a0718b61e1c2aa544c561ca667df7ba05e
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/lib/elementary/elm_entry.c

index 5fc0be1..420f099 100644 (file)
@@ -1078,7 +1078,16 @@ _selection_data_cb(void *data EINA_UNUSED,
      }
    else
      {
-        if (!(sel_data->format & ELM_SEL_FORMAT_MARKUP) && !(sel_data->format & ELM_SEL_FORMAT_HTML))
+        if (sel_data->format & ELM_SEL_FORMAT_HTML)
+          {
+             char *txt = _elm_util_mkup_to_text(buf);
+             if (txt)
+               {
+                  _edje_entry_user_insert(obj, txt);
+                  free(txt);
+               }
+          }
+        else if (!(sel_data->format & ELM_SEL_FORMAT_MARKUP))
           {
              char *txt = _elm_util_text_to_mkup(buf);
              if (txt)