evas_object_smart_callback_call(entry, SIG_ANCHOR_CLICKED, &ei);
}
+static char *
+_anchor_format_parse(const char *item)
+{
+ const char *start, *end;
+ char *tmp;
+ size_t len;
+
+ start = strchr(item, '=');
+ if (!start) return NULL;
+
+ start++; /* Advance after the '=' */
+ /* If we can find a quote as the first non-space char,
+ * our new delimiter is a quote, not a space. */
+ while (*start == ' ')
+ start++;
+
+ if (*start == '\'')
+ {
+ start++;
+ end = strchr(start, '\'');
+ while ((end) && (end > start) && (end[-1] == '\\'))
+ end = strchr(end + 1, '\'');
+ }
+ else
+ {
+ end = strchr(start, ' ');
+ while ((end) && (end > start) && (end[-1] == '\\'))
+ end = strchr(end + 1, ' ');
+ }
+
+ /* Null terminate before the spaces */
+ if (end) len = end - start;
+ else len = strlen(start);
+
+ tmp = malloc(len + 1);
+ strncpy(tmp, start, len);
+ tmp[len] = '\0';
+
+ return tmp;
+}
+
static void
_atspi_expose_anchors(Eo *obj, Eina_Bool is_atspi)
{
p = strstr(s, "href=");
if (p)
{
- name = strdup(p + 5);
+ name = _anchor_format_parse(p);
}
start = evas_object_textblock_cursor_new(tb);