Change-Id: I2c1b860554fe885482e3020faa97547c0dad615e
}
switch(trail->tagPosType)
{
}
switch(trail->tagPosType)
{
+ /* closed tag does not need in HTML
case TAGPOS_ALONE:
eina_strbuf_append(html, " />");
case TAGPOS_ALONE:
eina_strbuf_append(html, " />");
default:
eina_strbuf_append(html, ">");
break;
default:
eina_strbuf_append(html, ">");
break;
{
Elm_Selection_Data ddata;
{
Elm_Selection_Data ddata;
- str = mark_up((char *)data->data, data->length, NULL);
+ str = strdup(data->data);
ddata.x = ddata.y = 0;
ddata.format = ELM_SEL_FORMAT_TEXT;
ddata.data = str;
ddata.x = ddata.y = 0;
ddata.format = ELM_SEL_FORMAT_TEXT;
ddata.data = str;
if (size_ret) *size_ret = strlen(sel->selbuf);*/
char *edje = NULL;
if (size_ret) *size_ret = strlen(sel->selbuf);*/
char *edje = NULL;
- if (data_ret && (sel->format & ELM_SEL_FORMAT_HTML))
+ if (data_ret && (sel->format == ELM_SEL_FORMAT_TEXT))
+ {
+ if (sel->selbuf && sel->selbuf[0] != '\0')
+ edje = mark_up(sel->selbuf, strlen(sel->selbuf), NULL);
+ }
+ else if (data_ret && ((sel->format & ELM_SEL_FORMAT_HTML)))
{
Eina_List *nodeList = NULL;
Eina_List *trail;
{
Eina_List *nodeList = NULL;
Eina_List *trail;
sel = selections + *(int *)data;
char *html = NULL;
sel = selections + *(int *)data;
char *html = NULL;
- if (data_ret && (sel->format & ELM_SEL_FORMAT_MARKUP))
+ char *convert_target = sel->selbuf;
+ Eina_Bool convert_edje = EINA_FALSE;
+
+ if (data_ret && (sel->format == ELM_SEL_FORMAT_TEXT))
+ {
+ if (sel->selbuf && sel->selbuf[0] != '\0')
+ {
+ convert_target = mark_up(sel->selbuf, strlen(sel->selbuf), NULL);
+ convert_edje = EINA_TRUE;
+ }
+ }
+
+ if (data_ret && ((sel->format & ELM_SEL_FORMAT_MARKUP) || convert_edje))
{
Eina_List *nodeList = NULL;
Eina_List *trail;
PTagNode nodeData;
{
Eina_List *nodeList = NULL;
Eina_List *trail;
PTagNode nodeData;
- nodeData = _get_start_node(sel->selbuf);
+ nodeData = _get_start_node(convert_target);
else
*size_ret = strlen(sel->selbuf);
}
else
*size_ret = strlen(sel->selbuf);
}
+ if (convert_target != sel->selbuf)
+ free(convert_target);