+static void _ctxpopup_hide(Evas_Object *popup);
+static void _ctxpopup_position(Evas_Object *obj);
+
+static char *
+_remove_tags(const char *str)
+{
+ char *ret;
+ if (!str)
+ return NULL;
+
+ Eina_Strbuf *buf = eina_strbuf_new();
+ if (!buf)
+ return NULL;
+
+ if (!eina_strbuf_append(buf, str))
+ return NULL;
+
+ eina_strbuf_replace_all(buf, "<br>", " ");
+ eina_strbuf_replace_all(buf, "<br/>", " ");
+ eina_strbuf_replace_all(buf, "<ps>", " ");
+ eina_strbuf_replace_all(buf, "<ps/>", " ");
+
+ while (EINA_TRUE)
+ {
+ const char *temp = eina_strbuf_string_get(buf);
+
+ char *startTag = NULL;
+ char *endTag = NULL;
+
+ startTag = strstr(temp, "<");
+ if (startTag)
+ endTag = strstr(startTag, ">");
+ else
+ break;
+ if (!endTag || startTag > endTag)
+ break;
+
+ size_t sindex = startTag - temp;
+ size_t eindex = endTag - temp + 1;
+ if (!eina_strbuf_remove(buf, sindex, eindex))
+ break;
+ }
+ ret = eina_strbuf_string_steal(buf);
+ eina_strbuf_free(buf);
+ return ret;
+}
+
+static void
+_entry_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ evas_object_del(data);
+}
+
+static void
+_entry_hide_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ evas_object_hide(data);
+}
+
+static void
+_entry_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__)
+{
+ if (evas_pointer_button_down_mask_get(e))
+ _ctxpopup_hide(data);
+ else
+ {
+ /*update*/
+ elm_entry_extension_module_data_get(obj, ext_mod);
+ _ctxpopup_position(data);
+ }
+}
+
+static void
+_entry_resize_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ _ctxpopup_hide(data);
+}
+
+static void
+_ctxpopup_hide(Evas_Object *popup)
+{
+ evas_object_hide(popup);
+ evas_object_event_callback_del(ext_mod->caller, EVAS_CALLBACK_DEL, _entry_del_cb);
+ evas_object_event_callback_del(ext_mod->caller, EVAS_CALLBACK_HIDE, _entry_hide_cb);
+ evas_object_event_callback_del(ext_mod->caller, EVAS_CALLBACK_MOVE, _entry_move_cb);
+ evas_object_event_callback_del(ext_mod->caller, EVAS_CALLBACK_RESIZE, _entry_resize_cb);
+}
+