summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-04-08 11:53:10 +0100
committerRichard Hughes <richard@hughsie.com>2014-04-08 11:53:10 +0100
commitd491d8809183d5930e6ae87ce32859f60a5712bf (patch)
treee25f488665660601f05b64cf398c831a04a738aa
parent9d18b5e4f5065b7e5106c28d006f470374881918 (diff)
downloadappstream-glib-d491d8809183d5930e6ae87ce32859f60a5712bf.tar.gz
trivial: Fix the search tokenisation for old versions of Glib
-rw-r--r--libappstream-glib/as-app.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 07c6bf8..5722536 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -1622,15 +1622,19 @@ out:
static gchar **
as_app_value_tokenize (const gchar *value)
{
+ gchar *delim;
gchar **tmp;
gchar **values;
guint i;
- tmp = g_strsplit (value, " ", -1);
+ delim = g_strdup (value);
+ g_strdelimit (delim, "/,.;:", ' ');
+ tmp = g_strsplit (delim, " ", -1);
values = g_new0 (gchar *, g_strv_length (tmp) + 1);
for (i = 0; tmp[i] != NULL; i++) {
values[i] = g_utf8_strdown (tmp[i], -1);
}
g_strfreev (tmp);
+ g_free (delim);
return values;
}
#endif