aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-message-search.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2001-01-02 07:05:35 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-02 07:05:35 +0800
commitf561a84cdea45210b991faeddf908d7529d1592b (patch)
tree5b06a1f426e353e005c4b6c36cf8c1f68e761a83 /filter/filter-message-search.c
parent2f2faca992bfb471a2fb5717f5e50792744732a1 (diff)
downloadgsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.tar
gsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.tar.gz
gsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.tar.bz2
gsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.tar.lz
gsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.tar.xz
gsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.tar.zst
gsoc2013-evolution-f561a84cdea45210b991faeddf908d7529d1592b.zip
Use e_utf8_strstrcase() instead of just strstr(). (header_starts_with):
2000-12-21 Jeffrey Stedfast <fejj@helixcode.com> * filter-message-search.c (header_contains): Use e_utf8_strstrcase() instead of just strstr(). (header_starts_with): Make sure that the header contents are longer than the starts-with string. * vfoldertypes.xml: Don't send \"Subject\" to body-contains. Also added matches, starts-with, and ends-with xml stuff. svn path=/trunk/; revision=7204
Diffstat (limited to 'filter/filter-message-search.c')
-rw-r--r--filter/filter-message-search.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/filter/filter-message-search.c b/filter/filter-message-search.c
index cdfe64f2ae..4aee0dfdbd 100644
--- a/filter/filter-message-search.c
+++ b/filter/filter-message-search.c
@@ -21,6 +21,7 @@
*/
#include "filter-message-search.h"
+#include <gal/widgets/e-unicode.h>
#include <e-util/e-sexp.h>
#include <regex.h>
#include <string.h>
@@ -96,7 +97,7 @@ header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterM
contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
if (contents) {
- if (strstr (contents, match))
+ if (e_utf8_strstrcase (contents, match))
matched = TRUE;
}
}
@@ -167,7 +168,7 @@ header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, Filt
contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
- if (contents) {
+ if (contents && strlen (contents) >= strlen (match)) {
/* danw says to use search-engine style matching...
* This means that if the search match string is
* lowercase then compare case-insensitive else
@@ -695,7 +696,7 @@ user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageS
}
static ESExpResult *
-get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
{
ESExpResult *r;
@@ -706,7 +707,7 @@ get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMess
}
static ESExpResult *
-get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
{
ESExpResult *r;