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 | |
parent | 574b671429269a1d80b4d74d59f583a2cd1bcf44 (diff) | |
download | gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar.gz gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar.bz2 gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar.lz gsoc2013-evolution-f94b2023ad2b205697d2bad8ec7cc92434f41605.tar.xz 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
-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; } |