+static int match_search_keywords(struct task *task)
+{
+ gchar *desc;
+ int ret;
+ char **tags;
+ gchar *tag;
+
+ if (!search_keywords || !strlen(search_keywords))
+ return 1;
+
+ if (!task->description || !strlen(task->description))
+ return 0;
+
+ desc = g_ascii_strup(task->description, -1);
+
+ if (strstr(desc, search_keywords))
+ ret = 1;
+ else
+ ret = 0;
+
+ free(desc);
+
+ if (ret)
+ return 1;
+
+ tags = task->tags;
+ if (!tags)
+ return 0;
+
+ while (*tags) {
+ tag = g_ascii_strup(*tags, -1);
+
+ if (strstr(tag, search_keywords))
+ ret = 1;
+
+ free(tag);
+
+ if (ret)
+ return 1;
+
+ tags++;
+ }
+
+ return 0;
+}