diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 16 |
2 files changed, 20 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 80c7053000..dd3e285e82 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-08-08 Jon Trowbridge <trow@ximian.com> + + * camel-filter-search.c (get_source): Remove trailing stuff from + URLs before returning. (Done in an evil way, not in the good way + suggested by fejj. :)) (Bug #4876) + 2001-08-08 jacob berkman <jacob@ximian.com> * camel-search-private.c (camel_search_header_match): check for diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c index bbfbac249f..9cbb87cce6 100644 --- a/camel/camel-filter-search.c +++ b/camel/camel-filter-search.c @@ -403,13 +403,25 @@ static ESExpResult * get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) { ESExpResult *r; + char *src; + char *tmp; r = e_sexp_result_new (f, ESEXP_RES_STRING); if (fms->source) { - r->value.string = e_url_shroud (fms->source); + src = e_url_shroud (fms->source); } else { - r->value.string = g_strdup (camel_mime_message_get_source (fms->message)); + src = g_strdup (camel_mime_message_get_source (fms->message)); } + + /* This is an abusive hack */ + if ( src && (tmp = strstr (src, "://")) ) { + tmp += 3; + tmp = strchr (tmp, '/'); + if (tmp) + *tmp = '\0'; + } + + r->value.string = src; return r; } |