diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-08-09 10:27:40 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-08-09 10:27:40 +0800 |
commit | f94b2023ad2b205697d2bad8ec7cc92434f41605 (patch) | |
tree | c8fdce73247123a0a43b9bd5687321dded6de9e0 /camel/camel-filter-search.c | |
parent | 574b671429269a1d80b4d74d59f583a2cd1bcf44 (diff) | |
download | gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar.gz gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar.zst gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.zip |
Remove trailing stuff from URLs before returning. (Done in an evil way,
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)
svn path=/trunk/; revision=11808
Diffstat (limited to 'camel/camel-filter-search.c')
-rw-r--r-- | camel/camel-filter-search.c | 16 |
1 files changed, 14 insertions, 2 deletions
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; } |